public class

YtRating

extends AbstractExtension
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.youtube.YtRating

Class Overview

Object representation for the yt:rating tag.

Summary

Nested Classes
class YtRating.Value Value of this rating element. 
Constants
String NUM_DISLIKES
String NUM_LIKES
String VALUE
Fields
private int numDislikes
private int numLikes
private String value
[Expand]
Inherited Fields
From class com.google.gdata.data.AbstractExtension
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.
Public Methods
int getNumDislikes()
int getNumLikes()
String getValue()
void setNumDislikes(int numDislikes)
void setNumLikes(int numLikes)
void setValue(String value)
Protected Methods
void consumeAttributes(AttributeHelper helper)
Consumes attributes from the attribute helper.
void putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator.
[Expand]
Inherited Methods
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
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

Constant Value: "value"

Fields

private int numDislikes

private int numLikes

private String value

Public Constructors

public YtRating ()

Creates an empty tag.

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.

Parameters
value Rating value, one of YtRating.Value.

Public Methods

public int getNumDislikes ()

Returns
  • the numDislikes

public int getNumLikes ()

Returns
  • the numLikes

public String getValue ()

Returns
  • the value

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)

Parameters
value The value to set, one of YtRating.Value.

Protected Methods

protected void consumeAttributes (AttributeHelper helper)

Consumes attributes from the attribute helper. May also use consumeContent(boolean) to consume the element's text content. Called from getHandler(ExtensionProfile, String, String, Attributes). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
helper Attribute helper

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