ThumbRating
class ThumbRating : Rating
kotlin.Any | |
↳ | androidx.media2.session.ThumbRating |
A class for rating with a single degree of rating, "thumb up" vs "thumb down".
Summary
Public constructors | |
---|---|
<init>() Creates a unrated ThumbRating instance. |
|
Creates a ThumbRating instance. |
Public methods | |
---|---|
Boolean | |
Int |
hashCode() |
Boolean |
isRated() |
Boolean |
Returns whether the rating is "thumb up". |
String |
toString() |
Public constructors
<init>
ThumbRating()
Creates a unrated ThumbRating instance.
<init>
ThumbRating(thumbIsUp: Boolean)
Creates a ThumbRating instance.
Parameters | |
---|---|
thumbIsUp |
Boolean: true for a "thumb up" rating, false for "thumb down". |
Public methods
hashCode
fun hashCode(): Int
isRated
fun isRated(): Boolean
isThumbUp
fun isThumbUp(): Boolean
Returns whether the rating is "thumb up".
Return | |
---|---|
Boolean |
true if the rating is "thumb up", false if the rating is "thumb down", or if it is unrated. |
toString
fun toString(): String