Lines Matching defs:rating

33  * A class to encapsulate rating information used as content metadata.
34 * A rating is defined by its rating style (see {@link #RATING_HEART},
36 * {@link #RATING_5_STARS} or {@link #RATING_PERCENTAGE}) and the actual rating value (which may
37 * be defined as "unrated"), both of which are defined when the rating instance is constructed
61 * Indicates a rating style is not supported. A Rating2 will never have this
68 * A rating style with a single degree of rating, "heart" vs "no heart". Can be used to
74 * A rating style for "thumb up" vs "thumb down".
79 * A rating style with 0 to 3 stars.
84 * A rating style with 0 to 4 stars.
89 * A rating style with 0 to 5 stars.
94 * A rating style expressed as a percentage.
107 private Rating2(@Style int ratingStyle, float rating) {
109 mRatingValue = rating;
114 return "Rating2:style=" + mRatingStyle + " rating="
157 * Return a Rating2 instance with no rating.
158 * Create and return a new Rating2 instance with no rating known for the given
159 * rating style.
164 * @return null if an invalid rating style is passed, a new Rating2 instance otherwise.
181 * Return a Rating2 instance with a heart-based rating.
182 * Create and return a new Rating2 instance with a rating style of {@link #RATING_HEART},
183 * and a heart-based rating.
185 * @param hasHeart true for a "heart selected" rating, false for "heart unselected".
193 * Return a Rating2 instance with a thumb-based rating.
195 * rating style, and a "thumb up" or "thumb down" rating.
197 * @param thumbIsUp true for a "thumb up" rating, false for "thumb down".
205 * Return a Rating2 instance with a star-based rating.
206 * Create and return a new Rating2 instance with one of the star-base rating styles
208 * be used to represent an average rating value, which might not be an integer number of stars.
213 * the rating style.
214 * @return null if the rating style is invalid, or the rating is out of range,
231 Log.e(TAG, "Invalid rating style (" + starRatingStyle + ") for a star rating");
235 Log.e(TAG, "Trying to set out of range star-based rating");
242 * Return a Rating2 instance with a percentage-based rating.
244 * rating style, and a rating of the given percentage.
246 * @param percent the value of the rating
247 * @return null if the rating is out of range, a new Rating2 instance otherwise.
251 Log.e(TAG, "Invalid percentage-based rating value");
259 * Return whether there is a rating value available.
267 * Return the rating style.
277 * Return whether the rating is "heart selected".
278 * @return true if the rating is "heart selected", false if the rating is "heart unselected",
279 * if the rating style is not {@link #RATING_HEART} or if it is unrated.
286 * Return whether the rating is "thumb up".
287 * @return true if the rating is "thumb up", false if the rating is "thumb down",
288 * if the rating style is not {@link #RATING_THUMB_UP_DOWN} or if it is unrated.
295 * Return the star-based rating value.
296 * @return a rating value greater or equal to 0.0f, or a negative value if the rating style is
314 * Return the percentage-based rating value.
315 * @return a rating value greater or equal to 0.0f, or a negative value if the rating style is