Google Data APIs Client Library (1.41.1)



com.google.gdata.data.webmastertools
Class RegionCodeValueConstruct

java.lang.Object
  extended by com.google.gdata.data.AbstractExtension
      extended by com.google.gdata.data.ValueConstruct
          extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
AbstractExtension.AttributesHandler
 
Field Summary
static java.lang.String DEFAULT_REGION_CODE
          Default value for the region code is US
 
Fields inherited from class com.google.gdata.data.ValueConstruct
attrName
 
Fields inherited from class com.google.gdata.data.AbstractExtension
localName, namespace
 
Constructor Summary
RegionCodeValueConstruct(java.lang.String nodeName)
          Constructs ValueConstruct to represent the region code value.
 
Method Summary
 boolean equals(java.lang.Object rhs)
          Compares RegionCodeValueConstruct objects based on the region code value that they hold.
 int hashCode()
          Returns hash code which is based on the Region Code string representation.
 void setValue(java.lang.String value)
          Override ValueConstruct.setValue(String) to validate that the region code is not null.
 
Methods inherited from class com.google.gdata.data.ValueConstruct
consumeAttributes, generate, getHandler, getValue, 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

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
Constructor Detail

RegionCodeValueConstruct

public RegionCodeValueConstruct(java.lang.String nodeName)
Constructs ValueConstruct to represent the region code value.

Method Detail

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.