public class MutableRating extends Object implements Rating
DelimitedTextRatingCursor and similar places.| Constructor and Description |
|---|
MutableRating() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
long |
getItemId()
Get the item ID.
|
Preference |
getPreference()
Get the expressed preference.
|
long |
getTimestamp()
Get the event timestamp.
|
long |
getUserId()
Get the ID of the user responsible for the event.
|
double |
getValue()
Get the value rating.
|
int |
hashCode() |
boolean |
hasValue()
Query whether this rating has a value.
|
void |
setItemId(long iid)
Set the rating's new item ID.
|
void |
setRating(double v)
Set the rating value.
|
void |
setTimestamp(long ts)
Set the rating's new timestamp.
|
void |
setUserId(long uid)
Set the rating's user ID.
|
String |
toString() |
public final boolean hasValue()
Ratingpublic final double getValue()
throws IllegalStateException
RatinggetValue in interface RatingIllegalStateExceptionpublic long getUserId()
Eventpublic void setUserId(long uid)
uid - The new user ID.public long getItemId()
Eventpublic void setItemId(long iid)
iid - The new item ID.public Preference getPreference()
Ratingnull.getPreference in interface Ratingpublic void setRating(double v)
Double.NaN indicates an unrate
event.v - The rating value.public long getTimestamp()
EventgetTimestamp in interface Eventpublic void setTimestamp(long ts)
ts - The rating's timestamp.