public class

PostalAddress

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

Class Overview

Describes a postal address.

Summary

Nested Classes
class PostalAddress.Rel Postal address type. 
Fields
public static final ElementKey<String, PostalAddress> KEY The key for this element.
public static final AttributeKey<String> LABEL Simple string value used to name this address.
public static final AttributeKey<Boolean> PRIMARY Whether this is the primary postal address.
public static final AttributeKey<String> REL Postal address type.
[Expand]
Inherited Fields
From class com.google.gdata.model.Element
Public Constructors
PostalAddress()
Constructs an instance using the default key.
PostalAddress(String value)
Constructs a new instance with the given value.
Protected Constructors
PostalAddress(ElementKey<String, ? extends PostalAddress> key)
Subclass constructor, allows subclasses to supply their own element key.
PostalAddress(ElementKey<String, ? extends PostalAddress> 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 address.
Boolean getPrimary()
Returns the whether this is the primary postal address.
String getRel()
Returns the postal address type.
String getValue()
Returns the address string.
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.
int hashCode()
PostalAddress lock()
Locks this element.
static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
PostalAddress setLabel(String label)
Sets the simple string value used to name this address.
PostalAddress setPrimary(Boolean primary)
Sets the whether this is the primary postal address.
PostalAddress setRel(String rel)
Sets the postal address type.
PostalAddress setValue(String value)
Sets the address string.
[Expand]
Inherited Methods
From class com.google.gdata.model.Element
From class java.lang.Object

Fields

public static final ElementKey<String, PostalAddress> KEY

The key for this element.

public static final AttributeKey<String> LABEL

Simple string value used to name this address.

public static final AttributeKey<Boolean> PRIMARY

Whether this is the primary postal address.

public static final AttributeKey<String> REL

Postal address type.

Public Constructors

public PostalAddress ()

Constructs an instance using the default key.

public PostalAddress (String value)

Constructs a new instance with the given value.

Parameters
value Address string.

Protected Constructors

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

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

Parameters
key

protected PostalAddress (ElementKey<String, ? extends PostalAddress> 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 address.

Returns
  • simple string value used to name this address

public Boolean getPrimary ()

Returns the whether this is the primary postal address.

Returns
  • whether this is the primary postal address

public String getRel ()

Returns the postal address type.

Returns
  • postal address type

public String getValue ()

Returns the address string.

Returns
  • address string

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

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

public boolean hasRel ()

Returns whether it has the postal address type.

Returns
  • whether it has the postal address type

public boolean hasValue ()

Returns whether it has the address string.

Returns
  • whether it has the address string

public int hashCode ()

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

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

public PostalAddress setRel (String rel)

Sets the postal address type.

Parameters
rel Postal address type or null to reset
Returns
  • this to enable chaining setters

public PostalAddress setValue (String value)

Sets the address string.

Parameters
value Address string or null to reset
Returns
  • this to enable chaining setters