com.google.gdata.data.webmastertools
Class RegionCodeValueConstruct
java.lang.Object
com.google.gdata.data.AbstractExtension
com.google.gdata.data.ValueConstruct
com.google.gdata.data.webmastertools.RegionCodeValueConstruct
- All Implemented Interfaces:
- Extension
- Direct Known Subclasses:
- SitesEntry.Geolocation
public abstract class RegionCodeValueConstruct
- extends ValueConstruct
GData schema extension describing a node with a region code value.
This class is abstract, derive from this class and define a default
constructor which has the node name hardcoded, see
http://www.unicode.org/cldr/data/diff/supplemental/territory_containment_un_m_49.html
for a list of valid region codes.
Field Summary |
static java.lang.String |
DEFAULT_REGION_CODE
Default value for the region code is US |
Methods inherited from class com.google.gdata.data.AbstractExtension |
eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_REGION_CODE
public static final java.lang.String DEFAULT_REGION_CODE
- Default value for the region code is US
- See Also:
- Constant Field Values
RegionCodeValueConstruct
public RegionCodeValueConstruct(java.lang.String nodeName)
- Constructs
ValueConstruct
to represent the region code value.
equals
public boolean equals(java.lang.Object rhs)
- Compares
RegionCodeValueConstruct
objects based on the region code
value that they hold.
- Overrides:
equals
in class ValueConstruct
hashCode
public int hashCode()
- Returns hash code which is based on the Region Code string representation.
- Overrides:
hashCode
in class ValueConstruct
setValue
public void setValue(java.lang.String value)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException
- Override
ValueConstruct.setValue(String)
to validate that
the region code is not null.
- Overrides:
setValue
in class ValueConstruct
- Parameters:
value
- new value for the value construct or null
to reset.
- Throws:
java.lang.NullPointerException
- if the value is null.
java.lang.IllegalArgumentException
- if the value is invalid for the construct.