ThumbRating

Added in 1.0.0
Deprecated in 1.3.0

public final class ThumbRating implements Rating


A class for rating with a single degree of rating, "thumb up" vs "thumb down".

Summary

Public constructors

Creates a unrated ThumbRating instance.

ThumbRating(boolean thumbIsUp)

Creates a ThumbRating instance.

Public methods

boolean
int
boolean

Returns whether there is a rating value available.

boolean

Returns whether the rating is "thumb up".

String

Public constructors

ThumbRating

Added in 1.0.0
Deprecated in 1.3.0
public ThumbRating()

Creates a unrated ThumbRating instance.

ThumbRating

Added in 1.0.0
Deprecated in 1.3.0
public ThumbRating(boolean thumbIsUp)

Creates a ThumbRating instance.

Parameters
boolean thumbIsUp

true for a "thumb up" rating, false for "thumb down".

Public methods

equals

public boolean equals(Object obj)

hashCode

public int hashCode()

isRated

Added in 1.0.0
Deprecated in 1.3.0
public boolean isRated()

Returns whether there is a rating value available.

Returns
boolean

true if there is an available rating value.

isThumbUp

Added in 1.0.0
Deprecated in 1.3.0
public boolean isThumbUp()

Returns whether the rating is "thumb up".

Returns
boolean

true if the rating is "thumb up", false if the rating is "thumb down", or if it is unrated.

toString

public String toString()