Lines Matching defs:rating

28  * A class to encapsulate rating information used as content metadata.
29 * A rating is defined by its rating style (see {@link #RATING_HEART},
31 * {@link #RATING_5_STARS} or {@link #RATING_PERCENTAGE}) and the actual rating value (which may
32 * be defined as "unrated"), both of which are defined when the rating instance is constructed
54 * Indicates a rating style is not supported. A Rating will never have this
61 * A rating style with a single degree of rating, "heart" vs "no heart". Can be used to
67 * A rating style for "thumb up" vs "thumb down".
72 * A rating style with 0 to 3 stars.
77 * A rating style with 0 to 4 stars.
82 * A rating style with 0 to 5 stars.
87 * A rating style expressed as a percentage.
97 private Rating(@Style int ratingStyle, float rating) {
99 mRatingValue = rating;
104 return "Rating:style=" + mRatingStyle + " rating="
138 * Return a Rating instance with no rating.
139 * Create and return a new Rating instance with no rating known for the given
140 * rating style.
144 * @return null if an invalid rating style is passed, a new Rating instance otherwise.
161 * Return a Rating instance with a heart-based rating.
162 * Create and return a new Rating instance with a rating style of {@link #RATING_HEART},
163 * and a heart-based rating.
164 * @param hasHeart true for a "heart selected" rating, false for "heart unselected".
172 * Return a Rating instance with a thumb-based rating.
174 * rating style, and a "thumb up" or "thumb down" rating.
175 * @param thumbIsUp true for a "thumb up" rating, false for "thumb down".
183 * Return a Rating instance with a star-based rating.
184 * Create and return a new Rating instance with one of the star-base rating styles
186 * be used to represent an average rating value, which might not be an integer number of stars.
190 * the rating style.
191 * @return null if the rating style is invalid, or the rating is out of range,
207 Log.e(TAG, "Invalid rating style (" + starRatingStyle + ") for a star rating");
211 Log.e(TAG, "Trying to set out of range star-based rating");
218 * Return a Rating instance with a percentage-based rating.
220 * rating style, and a rating of the given percentage.
221 * @param percent the value of the rating
222 * @return null if the rating is out of range, a new Rating instance otherwise.
226 Log.e(TAG, "Invalid percentage-based rating value");
234 * Return whether there is a rating value available.
242 * Return the rating style.
253 * Return whether the rating is "heart selected".
254 * @return true if the rating is "heart selected", false if the rating is "heart unselected",
255 * if the rating style is not {@link #RATING_HEART} or if it is unrated.
266 * Return whether the rating is "thumb up".
267 * @return true if the rating is "thumb up", false if the rating is "thumb down",
268 * if the rating style is not {@link #RATING_THUMB_UP_DOWN} or if it is unrated.
279 * Return the star-based rating value.
280 * @return a rating value greater or equal to 0.0f, or a negative value if the rating style is
297 * Return the percentage-based rating value.
298 * @return a rating value greater or equal to 0.0f, or a negative value if the rating style is