com.google.appengine.api.datastore
Class Rating
java.lang.Object
com.google.appengine.api.datastore.Rating
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Rating>
public final class Rating
- extends java.lang.Object
- implements java.io.Serializable, java.lang.Comparable<Rating>
A user-provided integer rating for a piece of content. Normalized to a
0-100 scale.
- See Also:
- Serialized Form
Field Summary |
static int |
MAX_VALUE
The maximum legal value for a rating. |
static int |
MIN_VALUE
The minimum legal value for a rating. |
Constructor Summary |
Rating(int rating)
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
MIN_VALUE
public static final int MIN_VALUE
- The minimum legal value for a rating.
- See Also:
- Constant Field Values
MAX_VALUE
public static final int MAX_VALUE
- The maximum legal value for a rating.
- See Also:
- Constant Field Values
Rating
public Rating(int rating)
- Throws:
java.lang.IllegalArgumentException
- If rating
is smaller than
MIN_VALUE
or greater than MAX_VALUE
getRating
public int getRating()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
compareTo
public int compareTo(Rating o)
- Specified by:
compareTo
in interface java.lang.Comparable<Rating>