public interface Rating extends Event
Ratings are equal if they have the same user, item, preference and timestamp. The hash code
of a rating is the hash code of its preference (if it has one), or the user and item ID.
Timestamp is ignored in the hash code. See Ratings.equals(Rating, Rating)
and
Ratings.hashRating(Rating)
.
Ratings
Modifier and Type | Method and Description |
---|---|
Preference |
getPreference()
Get the expressed preference.
|
double |
getValue()
Get the value rating.
|
boolean |
hasValue()
Query whether this rating has a value.
|
getItemId, getTimestamp, getUserId
@Nullable Preference getPreference()
null
.boolean hasValue()
double getValue() throws IllegalStateException
IllegalStateException