Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

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

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)

Parameters
obj Object

Returns
boolean

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 ()

Returns
int

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 ()

Returns
String