|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.model.Element
com.google.gdata.model.gd.Rating
public class Rating
Describes a rating.
Nested Class Summary | |
---|---|
static class |
Rating.Rel
Programmatic value that describes the aspect that's being rated, if not specified, the rating is an overall rating. |
Field Summary | |
---|---|
static AttributeKey<java.lang.Float> |
AVERAGE
Average rating. |
static ElementKey<java.lang.Void,Rating> |
KEY
The key for this element. |
static AttributeKey<java.lang.Integer> |
MAX
Rating scale's maximum value. |
static AttributeKey<java.lang.Integer> |
MIN
Rating scale's minimum value. |
static AttributeKey<java.lang.Integer> |
NUM_RATERS
Number of ratings taken into account when computing the average value. |
static AttributeKey<java.lang.String> |
REL
Programmatic value that describes the aspect that's being rated, if not specified, the rating is an overall rating. |
static AttributeKey<java.lang.Integer> |
VALUE
Rating value. |
Constructor Summary | |
---|---|
Rating()
Constructs an instance using the default key. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.Float |
getAverage()
Returns the average rating. |
java.lang.Integer |
getMax()
Returns the rating scale's maximum value. |
java.lang.Integer |
getMin()
Returns the rating scale's minimum value. |
java.lang.Integer |
getNumRaters()
Returns the number of ratings taken into account when computing the average value. |
java.lang.String |
getRel()
Returns the programmatic value that describes the aspect that's being rated, if not specified, the rating is an overall rating. |
java.lang.Integer |
getValue()
Returns the rating value. |
boolean |
hasAverage()
Returns whether it has the average rating. |
int |
hashCode()
|
boolean |
hasMax()
Returns whether it has the rating scale's maximum value. |
boolean |
hasMin()
Returns whether it has the rating scale's minimum value. |
boolean |
hasNumRaters()
Returns whether it has the number of ratings taken into account when computing the average value. |
boolean |
hasRel()
Returns whether it has the programmatic value that describes the aspect that's being rated, if not specified, the rating is an overall rating. |
boolean |
hasValue()
Returns whether it has the rating value. |
Rating |
lock()
Locks this element. |
static void |
registerMetadata(MetadataRegistry registry)
Registers the metadata for this element. |
Rating |
setAverage(java.lang.Float average)
Sets the average rating. |
Rating |
setMax(java.lang.Integer max)
Sets the rating scale's maximum value. |
Rating |
setMin(java.lang.Integer min)
Sets the rating scale's minimum value. |
Rating |
setNumRaters(java.lang.Integer numRaters)
Sets the number of ratings taken into account when computing the average value. |
Rating |
setRel(java.lang.String rel)
Sets the programmatic value that describes the aspect that's being rated, if not specified, the rating is an overall rating. |
Rating |
setValue(java.lang.Integer value)
Sets the rating value. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ElementKey<java.lang.Void,Rating> KEY
public static final AttributeKey<java.lang.Float> AVERAGE
public static final AttributeKey<java.lang.Integer> MAX
public static final AttributeKey<java.lang.Integer> MIN
public static final AttributeKey<java.lang.Integer> NUM_RATERS
public static final AttributeKey<java.lang.String> REL
public static final AttributeKey<java.lang.Integer> VALUE
Constructor Detail |
---|
public Rating()
Method Detail |
---|
public static void registerMetadata(MetadataRegistry registry)
public Rating lock()
Element
lock
in class Element
public java.lang.Float getAverage()
public Rating setAverage(java.lang.Float average)
average
- average rating or null
to reset
public boolean hasAverage()
public java.lang.Integer getMax()
public Rating setMax(java.lang.Integer max)
max
- rating scale's maximum value or null
to reset
public boolean hasMax()
public java.lang.Integer getMin()
public Rating setMin(java.lang.Integer min)
min
- rating scale's minimum value or null
to reset
public boolean hasMin()
public java.lang.Integer getNumRaters()
public Rating setNumRaters(java.lang.Integer numRaters)
numRaters
- number of ratings taken into account when computing the
average value or null
to reset
public boolean hasNumRaters()
public java.lang.String getRel()
public Rating setRel(java.lang.String rel)
rel
- programmatic value that describes the aspect that's being rated,
if not specified, the rating is an overall rating or null
to
reset
public boolean hasRel()
public java.lang.Integer getValue()
public Rating setValue(java.lang.Integer value)
value
- rating value or null
to reset
public boolean hasValue()
public boolean equals(java.lang.Object obj)
equals
in class Element
public int hashCode()
hashCode
in class Element
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |