HeartRating
class HeartRating : Rating
kotlin.Any | |
↳ | 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 | |
---|---|
<init>() Creates a unrated HeartRating instance. |
|
Creates a HeartRating instance. |
Public methods | |
---|---|
Boolean | |
Boolean |
hasHeart() Returns whether the rating is "heart selected". |
Int |
hashCode() |
Boolean |
isRated() |
String |
toString() |
Public constructors
<init>
HeartRating()
Creates a unrated HeartRating instance.
<init>
HeartRating(hasHeart: Boolean)
Creates a HeartRating instance.
Parameters | |
---|---|
hasHeart |
Boolean: true for a "heart selected" rating, false for "heart unselected". |
Public methods
hasHeart
fun hasHeart(): Boolean
Returns whether the rating is "heart selected".
Return | |
---|---|
Boolean |
true if the rating is "heart selected", false if the rating is "heart unselected", or if it is unrated. |
hashCode
fun hashCode(): Int
isRated
fun isRated(): Boolean
toString
fun toString(): String