Known Direct Subclasses
|
Known Indirect Subclasses
|
Class Overview
The EnumConstruct class defines a special type of ValueConstruct
where the attribute values are constrained to a discrete set of valid
values.
Summary
| Fields |
|
protected
Set<String> |
values |
The set of valid values for the enum construct. |
| Protected Constructors |
|
|
EnumConstruct(XmlNamespace namespace, String tagName, String attrName, Set<String> values)
Constructs a new EnumConstruct instance associated with a particular
XML representation and set of expected values.
|
|
|
EnumConstruct(XmlNamespace namespace, String tagName, String attrName, Set<String> values, String initialValue)
Constructs a new EnumConstruct instance associated with a particular
XML representation and set of expected values.
|
| Public Methods |
|
void
|
setValue(String v)
Sets the value.
|
|
[Expand]
Inherited Methods |
From class
com.google.gdata.data.ValueConstruct
|
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
|
Fields
protected
Set<String>
values
The set of valid values for the enum construct.
Protected Constructors
protected
EnumConstruct
(XmlNamespace namespace, String tagName, String attrName, Set<String> values)
Constructs a new EnumConstruct instance associated with a particular
XML representation and set of expected values.
Parameters
| namespace
| |
| tagName
| |
| attrName
| |
| values
| |
protected
EnumConstruct
(XmlNamespace namespace, String tagName, String attrName, Set<String> values, String initialValue)
Constructs a new EnumConstruct instance associated with a particular
XML representation and set of expected values. An an initial value
is provided and it is not null, the constructed instance will
be initialized to the value and will be immutable.
Parameters
| namespace
| |
| tagName
| |
| attrName
| |
| values
| |
| initialValue
| |
Public Methods
public
void
setValue
(String v)
Sets the value. Subclasses can override this method to do
additional validation of the value.
Parameters
| v
| New value for the value construct or null to reset. |