HeartRating
public
final
class
HeartRating
extends Object
implements
Rating
java.lang.Object
|
↳ |
androidx.media2.session.HeartRating
|
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 |
HeartRating()
Creates a unrated HeartRating instance.
|
HeartRating(boolean hasHeart)
Creates a HeartRating instance.
|
Public methods |
boolean
|
equals(Object obj)
|
boolean
|
hasHeart()
Returns whether the rating is "heart selected".
|
int
|
hashCode()
|
boolean
|
isRated()
Returns whether there is a rating value available.
|
String
|
toString()
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
|
Public constructors
HeartRating
public HeartRating ()
Creates a unrated HeartRating instance.
HeartRating
public HeartRating (boolean hasHeart)
Creates a HeartRating instance.
Parameters |
hasHeart |
boolean : true for a "heart selected" rating, false for "heart unselected".
|
Public methods
equals
public boolean equals (Object obj)
hasHeart
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
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 ()