Class Overview
Object representation for the yt:rating tag.
Summary
| Nested Classes |
|
class |
YtRating.Value |
Value of this rating element. |
| Public Constructors |
|
|
YtRating()
Creates an empty tag.
|
|
|
YtRating(int numLikes, int numDislikes)
Creates a rating tag with the given attributes.
|
|
|
YtRating(String value)
Creates a rating tag with the given value.
|
|
[Expand]
Inherited Methods |
From class
com.google.gdata.data.AbstractExtension
|
void
|
consumeAttributes(AttributeHelper helper)
Consumes attributes from the attribute helper.
|
|
final
static
void
|
disableStrictValidation()
|
|
final
static
void
|
enableStrictValidation()
|
|
static
boolean
|
eq(Object o1, Object o2)
|
|
void
|
generate(XmlWriter w, ExtensionProfile p)
Generates an XML representation for the extension.
|
|
void
|
generate(XmlWriter w, ExtensionProfile p, XmlNamespace namespace, String localName, List<XmlWriter.Attribute> attrs, AttributeGenerator generator)
Generates the XML into the XML writer.
|
|
void
|
generateAttributes(List<XmlWriter.Attribute> attrs, AttributeGenerator generator)
Generates the attributes in the generator into the list of attributes.
|
|
final
String
|
getExtensionLocalName()
Gets the extension's localname.
|
|
final
XmlNamespace
|
getExtensionNamespace()
Gets the extension's namespace.
|
|
XmlParser.ElementHandler
|
getHandler(ExtensionProfile p, String namespace, String localName, Attributes attrs)
|
|
final
boolean
|
isImmutable()
|
|
final
static
boolean
|
isStrictValidation()
|
|
void
|
putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator.
|
|
boolean
|
sameClassAs(Object o)
|
|
final
void
|
setImmutable(boolean isImmutable)
|
|
final
static
void
|
throwExceptionForMissingAttribute(String attrName)
Throws an IllegalStateException if the value is required
and it is missing.
|
|
final
void
|
throwExceptionIfImmutable()
Throws an IllegalStateException if this instance is immutable.
|
|
void
|
validate()
Checks the attributes to see if there are any problems.
|
|
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
From interface
com.google.gdata.data.Extension
|
Constants
private
static
final
String
NUM_DISLIKES
Constant Value:
"numDislikes"
private
static
final
String
NUM_LIKES
Constant Value:
"numLikes"
private
static
final
String
VALUE
Fields
Public Constructors
public
YtRating
(int numLikes, int numDislikes)
Creates a rating tag with the given attributes.
Parameters
| numLikes
| Number of like votes. |
| numDislikes
| Number of dislike votes.
|
public
YtRating
(String value)
Creates a rating tag with the given value.
Public Methods
public
int
getNumDislikes
()
public
int
getNumLikes
()
public
String
getValue
()
public
void
setNumDislikes
(int numDislikes)
Parameters
| numDislikes
| The numDislikes to set
|
public
void
setNumLikes
(int numLikes)
Parameters
| numLikes
| The numLikes to set
|
public
void
setValue
(String value)
Protected Methods
protected
void
putAttributes
(AttributeGenerator generator)
Puts attributes into the attribute generator. Called from
generate(XmlWriter, ExtensionProfile). Default implementation
does nothing, though generally this is discouraged unless there really are
no attributes.
Parameters
| generator
| Attribute generator
|