Rating (Google App Engine API for Java)
Stay organized with collections
Save and categorize content based on your preferences.
- java.lang.Object
-
- com.google.appengine.api.datastore.Rating
-
-
Field Summary
Fields
Modifier and Type |
Field and Description |
static int |
MAX_VALUE
The maximum legal value for a rating.
|
static int |
MIN_VALUE
The minimum legal value for a rating.
|
static long |
serialVersionUID |
-
Constructor Summary
Constructors
Constructor and Description |
Rating(int rating) |
-
Method Summary
-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
Rating
public Rating(int rating)
- Throws:
java.lang.IllegalArgumentException
- If rating
is smaller than MIN_VALUE
or
greater than MAX_VALUE
-
Method Detail
-
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>
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["The `Rating` class represents a user-provided integer rating, normalized to a scale of 0-100."],["`Rating` objects can be created using the constructor `Rating(int rating)`, and they throw an `IllegalArgumentException` if the provided rating is outside the defined minimum and maximum values."],["The class defines `MIN_VALUE` and `MAX_VALUE` as static fields to represent the minimum and maximum legal values for a rating, respectively."],["The `Rating` class implements `java.io.Serializable` and `java.lang.Comparable\u003cRating\u003e`, allowing for serialization and comparison between `Rating` objects."],["The class provides methods such as `getRating()`, `equals()`, `hashCode()`, and `compareTo()` for accessing the rating value, checking equality, generating hash codes, and comparing instances."]]],[]]