HeartRating

Added in 1.0.0
Deprecated in 1.3.0

public final class HeartRating implements Rating


A class for rating with a single degree of rating, "heart" vs "no heart". This can be used to indicate the content referred to is a favorite (or not).

Summary

Public constructors

Creates a unrated HeartRating instance.

HeartRating(boolean hasHeart)

Creates a HeartRating instance.

Public methods

boolean
boolean

Returns whether the rating is "heart selected".

int
boolean

Returns whether there is a rating value available.

String

Public constructors

HeartRating

Added in 1.0.0
Deprecated in 1.3.0
public HeartRating()

Creates a unrated HeartRating instance.

HeartRating

Added in 1.0.0
Deprecated in 1.3.0
public HeartRating(boolean hasHeart)

Creates a HeartRating instance.

Parameters
boolean hasHeart

true for a "heart selected" rating, false for "heart unselected".

Public methods

equals

public boolean equals(Object obj)

hasHeart

Added in 1.0.0
Deprecated in 1.3.0
public boolean hasHeart()

Returns whether the rating is "heart selected".

Returns
boolean

true if the rating is "heart selected", false if the rating is "heart unselected", or if it is unrated.

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.

toString

public String toString()