com.google.gdata.model.gd
Class PhoneNumber

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

public class PhoneNumber
extends Element

Describes a phone number.


Nested Class Summary
static class PhoneNumber.Rel
          Programmatic value that identifies the type of phone number.
 
Field Summary
static ElementKey<java.lang.String,PhoneNumber> KEY
          The key for this element.
static AttributeKey<java.lang.String> LABEL
          Simple string value used to name this phone number.
static AttributeKey<java.lang.Boolean> PRIMARY
          Whether this is the primary phone number.
static AttributeKey<java.lang.String> REL
          Programmatic value that identifies the type of phone number.
 
Constructor Summary
PhoneNumber()
          Constructs an instance using the default key.
PhoneNumber(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 phone number.
 java.lang.Boolean getPrimary()
          Returns the whether this is the primary phone number.
 java.lang.String getRel()
          Returns the programmatic value that identifies the type of phone number.
 java.lang.String getValue()
          Returns the human-readable phone number.
 int hashCode()
           
 boolean hasLabel()
          Returns whether it has the simple string value used to name this phone number.
 boolean hasPrimary()
          Returns whether it has the whether this is the primary phone number.
 boolean hasRel()
          Returns whether it has the programmatic value that identifies the type of phone number.
 boolean hasValue()
          Returns whether it has the human-readable phone number.
 PhoneNumber lock()
          Locks this element.
static void registerMetadata(MetadataRegistry registry)
          Registers the metadata for this element.
 PhoneNumber setLabel(java.lang.String label)
          Sets the simple string value used to name this phone number.
 PhoneNumber setPrimary(java.lang.Boolean primary)
          Sets the whether this is the primary phone number.
 PhoneNumber setRel(java.lang.String rel)
          Sets the programmatic value that identifies the type of phone number.
 PhoneNumber setValue(java.lang.String value)
          Sets the human-readable phone number.
 
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,PhoneNumber> KEY
The key for this element.


LABEL

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


PRIMARY

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


REL

public static final AttributeKey<java.lang.String> REL
Programmatic value that identifies the type of phone number.

Constructor Detail

PhoneNumber

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


PhoneNumber

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

Parameters:
value - human-readable phone number.
Method Detail

registerMetadata

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


lock

public PhoneNumber 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 phone number.

Returns:
simple string value used to name this phone number

setLabel

public PhoneNumber setLabel(java.lang.String label)
Sets the simple string value used to name this phone number.

Parameters:
label - simple string value used to name this phone number 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 phone number.

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

getPrimary

public java.lang.Boolean getPrimary()
Returns the whether this is the primary phone number.

Returns:
whether this is the primary phone number

setPrimary

public PhoneNumber setPrimary(java.lang.Boolean primary)
Sets the whether this is the primary phone number.

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

hasPrimary

public boolean hasPrimary()
Returns whether it has the whether this is the primary phone number.

Returns:
whether it has the whether this is the primary phone number

getRel

public java.lang.String getRel()
Returns the programmatic value that identifies the type of phone number.

Returns:
programmatic value that identifies the type of phone number

setRel

public PhoneNumber setRel(java.lang.String rel)
Sets the programmatic value that identifies the type of phone number.

Parameters:
rel - programmatic value that identifies the type of phone number or null to reset
Returns:
this to enable chaining setters

hasRel

public boolean hasRel()
Returns whether it has the programmatic value that identifies the type of phone number.

Returns:
whether it has the programmatic value that identifies the type of phone number

getValue

public java.lang.String getValue()
Returns the human-readable phone number.

Returns:
human-readable phone number

setValue

public PhoneNumber setValue(java.lang.String value)
Sets the human-readable phone number.

Parameters:
value - human-readable phone number or null to reset
Returns:
this to enable chaining setters

hasValue

public boolean hasValue()
Returns whether it has the human-readable phone number.

Returns:
whether it has the human-readable phone number

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Element