public abstract class

EnumConstruct

extends ValueConstruct
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ValueConstruct
       ↳ com.google.gdata.data.EnumConstruct
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.
[Expand]
Inherited Fields
From class com.google.gdata.data.ValueConstruct
From class com.google.gdata.data.AbstractExtension
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
From class java.lang.Object
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.
Throws
IllegalArgumentException