Package com.google.android.exoplayer2
Class PercentageRating
- java.lang.Object
-
- com.google.android.exoplayer2.Rating
-
- com.google.android.exoplayer2.PercentageRating
-
- All Implemented Interfaces:
Bundleable
public final class PercentageRating extends Rating
A rating expressed as a percentage.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
Fields Modifier and Type Field Description static Bundleable.Creator<PercentageRating>CREATORObject that can restore aPercentageRatingfrom aBundle.-
Fields inherited from class com.google.android.exoplayer2.Rating
RATING_UNSET
-
-
Constructor Summary
Constructors Constructor Description PercentageRating()Creates a unrated instance.PercentageRating(float percent)Creates a rated instance with the given percentage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)floatgetPercent()Returns the percent value of this rating.inthashCode()booleanisRated()Whether the rating exists or not.BundletoBundle()Returns aBundlerepresenting the information stored in this object.
-
-
-
Field Detail
-
CREATOR
public static final Bundleable.Creator<PercentageRating> CREATOR
Object that can restore aPercentageRatingfrom aBundle.
-
-
Method Detail
-
isRated
public boolean isRated()
Description copied from class:RatingWhether the rating exists or not.
-
getPercent
public float getPercent()
Returns the percent value of this rating. Will be within the range[0f, 100f], orRating.RATING_UNSETif unrated.
-
toBundle
public Bundle toBundle()
Description copied from interface:BundleableReturns aBundlerepresenting the information stored in this object.
-
-