public class

PhoneNumber

extends Element
java.lang.Object
   ↳ com.google.gdata.model.Element
     ↳ com.google.gdata.model.gd.PhoneNumber

Class Overview

Describes a phone number.

Summary

Nested Classes
class PhoneNumber.Rel Programmatic value that identifies the type of phone number. 
Fields
public static final ElementKey<String, PhoneNumber> KEY The key for this element.
public static final AttributeKey<String> LABEL Simple string value used to name this phone number.
public static final AttributeKey<Boolean> PRIMARY Whether this is the primary phone number.
public static final AttributeKey<String> REL Programmatic value that identifies the type of phone number.
public static final AttributeKey<String> URI An optional "tel URI" useful for programmatic access.
[Expand]
Inherited Fields
From class com.google.gdata.model.Element
Public Constructors
PhoneNumber()
Constructs an instance using the default key.
PhoneNumber(String value)
Constructs a new instance with the given value.
Protected Constructors
PhoneNumber(ElementKey<String, ? extends PhoneNumber> key)
Subclass constructor, allows subclasses to supply their own element key.
PhoneNumber(ElementKey<String, ? extends PhoneNumber> key, Element source)
Constructs a new instance by doing a shallow copy of data from an existing Element instance.
Public Methods
boolean equals(Object obj)
String getLabel()
Returns the simple string value used to name this phone number.
Boolean getPrimary()
Returns the whether this is the primary phone number.
String getRel()
Returns the programmatic value that identifies the type of phone number.
String getUri()
Returns the An optional "tel URI" useful for programmatic access.
String getValue()
Returns the human-readable phone number.
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 hasUri()
Returns whether it has the An optional "tel URI" useful for programmatic access.
boolean hasValue()
Returns whether it has the human-readable phone number.
int hashCode()
PhoneNumber lock()
Locks this element.
static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
PhoneNumber setLabel(String label)
Sets the simple string value used to name this phone number.
PhoneNumber setPrimary(Boolean primary)
Sets the whether this is the primary phone number.
PhoneNumber setRel(String rel)
Sets the programmatic value that identifies the type of phone number.
PhoneNumber setUri(String uri)
Sets the An optional "tel URI" useful for programmatic access.
PhoneNumber setValue(String value)
Sets the human-readable phone number.
[Expand]
Inherited Methods
From class com.google.gdata.model.Element
From class java.lang.Object

Fields

public static final ElementKey<String, PhoneNumber> KEY

The key for this element.

public static final AttributeKey<String> LABEL

Simple string value used to name this phone number.

public static final AttributeKey<Boolean> PRIMARY

Whether this is the primary phone number.

public static final AttributeKey<String> REL

Programmatic value that identifies the type of phone number.

public static final AttributeKey<String> URI

An optional "tel URI" useful for programmatic access.

Public Constructors

public PhoneNumber ()

Constructs an instance using the default key.

public PhoneNumber (String value)

Constructs a new instance with the given value.

Parameters
value Human-readable phone number.

Protected Constructors

protected PhoneNumber (ElementKey<String, ? extends PhoneNumber> key)

Subclass constructor, allows subclasses to supply their own element key.

Parameters
key

protected PhoneNumber (ElementKey<String, ? extends PhoneNumber> key, Element source)

Constructs a new instance by doing a shallow copy of data from an existing Element instance. Will use the given ElementKey as the key for the element. This constructor is used when adapting from one element key to another. You cannot call this constructor directly, instead use createElement(ElementKey, Element).

Parameters
key The key to use for this element.
source Source element

Public Methods

public boolean equals (Object obj)

Parameters
obj

public String getLabel ()

Returns the simple string value used to name this phone number.

Returns
  • simple string value used to name this phone number

public Boolean getPrimary ()

Returns the whether this is the primary phone number.

Returns
  • whether this is the primary phone number

public String getRel ()

Returns the programmatic value that identifies the type of phone number.

Returns
  • programmatic value that identifies the type of phone number

public String getUri ()

Returns the An optional "tel URI" useful for programmatic access.

Returns
  • An optional "tel URI" useful for programmatic access

public String getValue ()

Returns the human-readable phone number.

Returns
  • human-readable phone number

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

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

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

public boolean hasUri ()

Returns whether it has the An optional "tel URI" useful for programmatic access.

Returns
  • whether it has the An optional "tel URI" useful for programmatic access

public boolean hasValue ()

Returns whether it has the human-readable phone number.

Returns
  • whether it has the human-readable phone number

public int hashCode ()

public PhoneNumber lock ()

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.

public static void registerMetadata (MetadataRegistry registry)

Registers the metadata for this element.

Parameters
registry

public PhoneNumber setLabel (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

public PhoneNumber setPrimary (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

public PhoneNumber setRel (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

public PhoneNumber setUri (String uri)

Sets the An optional "tel URI" useful for programmatic access.

Parameters
uri An optional "tel URI" useful for programmatic access or null to reset
Returns
  • this to enable chaining setters

public PhoneNumber setValue (String value)

Sets the human-readable phone number.

Parameters
value Human-readable phone number or null to reset
Returns
  • this to enable chaining setters