com.google.gdata.model.gd
Class PostalAddress

java.lang.Object
  extended by com.google.gdata.model.Element
      extended by com.google.gdata.model.gd.PostalAddress

public class PostalAddress
extends Element

Describes a postal address.


Nested Class Summary
static class PostalAddress.Rel
          Postal address type.
 
Field Summary
static ElementKey<java.lang.String,PostalAddress> KEY
          The key for this element.
static AttributeKey<java.lang.String> LABEL
          Simple string value used to name this address.
static AttributeKey<java.lang.Boolean> PRIMARY
          Whether this is the primary postal address.
static AttributeKey<java.lang.String> REL
          Postal address type.
 
Constructor Summary
PostalAddress()
          Constructs an instance using the default key.
PostalAddress(java.lang.String value)
          Constructs a new instance with the given value.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getLabel()
          Returns the simple string value used to name this address.
 java.lang.Boolean getPrimary()
          Returns the whether this is the primary postal address.
 java.lang.String getRel()
          Returns the postal address type.
 java.lang.String getValue()
          Returns the address string.
 int hashCode()
           
 boolean hasLabel()
          Returns whether it has the simple string value used to name this address.
 boolean hasPrimary()
          Returns whether it has the whether this is the primary postal address.
 boolean hasRel()
          Returns whether it has the postal address type.
 boolean hasValue()
          Returns whether it has the address string.
 PostalAddress lock()
          Locks this element.
static void registerMetadata(MetadataRegistry registry)
          Registers the metadata for this element.
 PostalAddress setLabel(java.lang.String label)
          Sets the simple string value used to name this address.
 PostalAddress setPrimary(java.lang.Boolean primary)
          Sets the whether this is the primary postal address.
 PostalAddress setRel(java.lang.String rel)
          Sets the postal address type.
 PostalAddress setValue(java.lang.String value)
          Sets the address string.
 
Methods inherited from class com.google.gdata.model.Element
addElement, addElement, addElement, clear, createElement, createElement, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hasTextValue, isLocked, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, visit
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY

public static final ElementKey<java.lang.String,PostalAddress> KEY
The key for this element.


LABEL

public static final AttributeKey<java.lang.String> LABEL
Simple string value used to name this address.


PRIMARY

public static final AttributeKey<java.lang.Boolean> PRIMARY
Whether this is the primary postal address.


REL

public static final AttributeKey<java.lang.String> REL
Postal address type.

Constructor Detail

PostalAddress

public PostalAddress()
Constructs an instance using the default key.


PostalAddress

public PostalAddress(java.lang.String value)
Constructs a new instance with the given value.

Parameters:
value - address string.
Method Detail

registerMetadata

public static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.


lock

public PostalAddress lock()
Description copied from class: Element
Locks this element. A locked element cannot have any changes made to its content or its attributes or child elements. This will also lock all attributes and child elements as well. Once this method has been called, this element can be safely published to other threads.

Overrides:
lock in class Element

getLabel

public java.lang.String getLabel()
Returns the simple string value used to name this address.

Returns:
simple string value used to name this address

setLabel

public PostalAddress setLabel(java.lang.String label)
Sets the simple string value used to name this address.

Parameters:
label - simple string value used to name this address or null to reset
Returns:
this to enable chaining setters

hasLabel

public boolean hasLabel()
Returns whether it has the simple string value used to name this address.

Returns:
whether it has the simple string value used to name this address

getPrimary

public java.lang.Boolean getPrimary()
Returns the whether this is the primary postal address.

Returns:
whether this is the primary postal address

setPrimary

public PostalAddress setPrimary(java.lang.Boolean primary)
Sets the whether this is the primary postal address.

Parameters:
primary - whether this is the primary postal address or null to reset
Returns:
this to enable chaining setters

hasPrimary

public boolean hasPrimary()
Returns whether it has the whether this is the primary postal address.

Returns:
whether it has the whether this is the primary postal address

getRel

public java.lang.String getRel()
Returns the postal address type.

Returns:
postal address type

setRel

public PostalAddress setRel(java.lang.String rel)
Sets the postal address type.

Parameters:
rel - postal address type or null to reset
Returns:
this to enable chaining setters

hasRel

public boolean hasRel()
Returns whether it has the postal address type.

Returns:
whether it has the postal address type

getValue

public java.lang.String getValue()
Returns the address string.

Returns:
address string

setValue

public PostalAddress setValue(java.lang.String value)
Sets the address string.

Parameters:
value - address string or null to reset
Returns:
this to enable chaining setters

hasValue

public boolean hasValue()
Returns whether it has the address string.

Returns:
whether it has the address string

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Element

hashCode

public int hashCode()
Overrides:
hashCode in class Element