Lines Matching defs:rating

25  * A class to encapsulate rating information used as content metadata.
26 * A rating is defined by its rating style (see {@link #RATING_HEART},
28 * {@link #RATING_5_STARS} or {@link #RATING_PERCENTAGE}) and the actual rating value (which may
29 * be defined as "unrated"), both of which are defined when the rating instance is constructed
37 * A rating style with a single degree of rating, "heart" vs "no heart". Can be used to
43 * A rating style for "thumb up" vs "thumb down".
48 * A rating style with 0 to 3 stars.
53 * A rating style with 0 to 4 stars.
58 * A rating style with 0 to 5 stars.
63 * A rating style expressed as a percentage.
73 private Rating(int ratingStyle, float rating) {
75 mRatingValue = rating;
84 return "Rating:style=" + mRatingStyle + " rating="
115 * Return a Rating instance with no rating.
116 * Create and return a new Rating instance with no rating known for the given
117 * rating style.
121 * @return null if an invalid rating style is passed, a new Rating instance otherwise.
138 * Return a Rating instance with a heart-based rating.
139 * Create and return a new Rating instance with a rating style of {@link #RATING_HEART},
140 * and a heart-based rating.
141 * @param hasHeart true for a "heart selected" rating, false for "heart unselected".
149 * Return a Rating instance with a thumb-based rating.
151 * rating style, and a "thumb up" or "thumb down" rating.
152 * @param thumbIsUp true for a "thumb up" rating, false for "thumb down".
160 * Return a Rating instance with a star-based rating.
161 * Create and return a new Rating instance with one of the star-base rating styles
163 * be used to represent an average rating value, which might not be an integer number of stars.
167 * the rating style.
168 * @return null if the rating style is invalid, or the rating is out of range,
184 Log.e(TAG, "Invalid rating style (" + starRatingStyle + ") for a star rating");
188 Log.e(TAG, "Trying to set out of range star-based rating");
195 * Return a Rating instance with a percentage-based rating.
197 * rating style, and a rating of the given percentage.
198 * @param percent the value of the rating
199 * @return null if the rating is out of range, a new Rating instance otherwise.
203 Log.e(TAG, "Invalid percentage-based rating value");
211 * Return whether there is a rating value available.
219 * Return the rating style.
229 * Return whether the rating is "heart selected".
230 * @return true if the rating is "heart selected", false if the rating is "heart unselected",
231 * if the rating style is not {@link #RATING_HEART} or if it is unrated.
242 * Return whether the rating is "thumb up".
243 * @return true if the rating is "thumb up", false if the rating is "thumb down",
244 * if the rating style is not {@link #RATING_THUMB_UP_DOWN} or if it is unrated.
255 * Return the star-based rating value.
256 * @return a rating value greater or equal to 0.0f, or a negative value if the rating style is
273 * Return the percentage-based rating value.
274 * @return a rating value greater or equal to 0.0f, or a negative value if the rating style is