Google Data APIs Client Library (1.41.1)



com.google.gdata.data
Class EnumConstruct

java.lang.Object
  extended by com.google.gdata.data.AbstractExtension
      extended by com.google.gdata.data.ValueConstruct
          extended by com.google.gdata.data.EnumConstruct
All Implemented Interfaces:
Extension
Direct Known Subclasses:
CrawlRateConstruct, DomainPreferenceConstruct

public abstract class EnumConstruct
extends ValueConstruct

The EnumConstruct class defines a special type of ValueConstruct where the attribute values are constrained to a discrete set of valid values.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
AbstractExtension.AttributesHandler
 
Field Summary
protected  java.util.Set<java.lang.String> values
          The set of valid values for the enum construct.
 
Fields inherited from class com.google.gdata.data.ValueConstruct
attrName
 
Fields inherited from class com.google.gdata.data.AbstractExtension
localName, namespace
 
Constructor Summary
protected EnumConstruct(com.google.gdata.util.common.xml.XmlNamespace namespace, java.lang.String tagName, java.lang.String attrName, java.util.Set<java.lang.String> values)
          Constructs a new EnumConstruct instance associated with a particular XML representation and set of expected values.
protected EnumConstruct(com.google.gdata.util.common.xml.XmlNamespace namespace, java.lang.String tagName, java.lang.String attrName, java.util.Set<java.lang.String> values, java.lang.String initialValue)
          Constructs a new EnumConstruct instance associated with a particular XML representation and set of expected values.
 
Method Summary
 void setValue(java.lang.String v)
          Sets the value.
 
Methods inherited from class com.google.gdata.data.ValueConstruct
consumeAttributes, equals, generate, getHandler, getValue, hashCode, hasValue, isRequired, putAttributes, setRequired
 
Methods inherited from class com.google.gdata.data.AbstractExtension
disableStrictValidation, enableStrictValidation, eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

values

protected java.util.Set<java.lang.String> values
The set of valid values for the enum construct.

Constructor Detail

EnumConstruct

protected EnumConstruct(com.google.gdata.util.common.xml.XmlNamespace namespace,
                        java.lang.String tagName,
                        java.lang.String attrName,
                        java.util.Set<java.lang.String> values)
Constructs a new EnumConstruct instance associated with a particular XML representation and set of expected values.


EnumConstruct

protected EnumConstruct(com.google.gdata.util.common.xml.XmlNamespace namespace,
                        java.lang.String tagName,
                        java.lang.String attrName,
                        java.util.Set<java.lang.String> values,
                        java.lang.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.

Method Detail

setValue

public void setValue(java.lang.String v)
              throws java.lang.IllegalArgumentException
Description copied from class: ValueConstruct
Sets the value. Subclasses can override this method to do additional validation of the value.

Overrides:
setValue in class ValueConstruct
Parameters:
v - new value for the value construct or null to reset.
Throws:
java.lang.IllegalArgumentException - if the value is invalid for the construct.