public class

Email

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

Class Overview

Describes an email address.

Summary

Nested Classes
class Email.Rel Email type. 
Fields
public static final AttributeKey<String> ADDRESS Email address.
public static final AttributeKey<String> DISPLAY_NAME DisplayName.
public static final ElementKey<Void, Email> KEY The key for this element.
public static final AttributeKey<String> LABEL Label.
public static final AttributeKey<Boolean> PRIMARY Whether this is the primary email address.
public static final AttributeKey<String> REL Email type.
[Expand]
Inherited Fields
From class com.google.gdata.model.Element
Public Constructors
Email()
Constructs an instance using the default key.
Protected Constructors
Email(ElementKey<?, ? extends Email> key)
Subclass constructor, allows subclasses to supply their own element key.
Email(ElementKey<?, ? extends Email> 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 getAddress()
Returns the email address.
String getDisplayName()
Returns the displayName.
String getLabel()
Returns the label.
Boolean getPrimary()
Returns the whether this is the primary email address.
String getRel()
Returns the email type.
boolean hasAddress()
Returns whether it has the email address.
boolean hasDisplayName()
Returns whether it has the displayName.
boolean hasLabel()
Returns whether it has the label.
boolean hasPrimary()
Returns whether it has the whether this is the primary email address.
boolean hasRel()
Returns whether it has the email type.
int hashCode()
Email lock()
Locks this element.
static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
Email setAddress(String address)
Sets the email address.
Email setDisplayName(String displayName)
Sets the displayName.
Email setLabel(String label)
Sets the label.
Email setPrimary(Boolean primary)
Sets the whether this is the primary email address.
Email setRel(String rel)
Sets the email type.
[Expand]
Inherited Methods
From class com.google.gdata.model.Element
From class java.lang.Object

Fields

public static final AttributeKey<String> ADDRESS

Email address.

public static final AttributeKey<String> DISPLAY_NAME

DisplayName.

public static final ElementKey<Void, Email> KEY

The key for this element.

public static final AttributeKey<String> LABEL

Label.

public static final AttributeKey<Boolean> PRIMARY

Whether this is the primary email address.

public static final AttributeKey<String> REL

Email type.

Public Constructors

public Email ()

Constructs an instance using the default key.

Protected Constructors

protected Email (ElementKey<?, ? extends Email> key)

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

Parameters
key

protected Email (ElementKey<?, ? extends Email> 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 getAddress ()

Returns the email address.

Returns
  • email address

public String getDisplayName ()

Returns the displayName.

Returns
  • displayName

public String getLabel ()

Returns the label.

Returns
  • label

public Boolean getPrimary ()

Returns the whether this is the primary email address.

Returns
  • whether this is the primary email address

public String getRel ()

Returns the email type.

Returns
  • email type

public boolean hasAddress ()

Returns whether it has the email address.

Returns
  • whether it has the email address

public boolean hasDisplayName ()

Returns whether it has the displayName.

Returns
  • whether it has the displayName

public boolean hasLabel ()

Returns whether it has the label.

Returns
  • whether it has the label

public boolean hasPrimary ()

Returns whether it has the whether this is the primary email address.

Returns
  • whether it has the whether this is the primary email address

public boolean hasRel ()

Returns whether it has the email type.

Returns
  • whether it has the email type

public int hashCode ()

public Email 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 Email setAddress (String address)

Sets the email address.

Parameters
address Email address or null to reset
Returns
  • this to enable chaining setters

public Email setDisplayName (String displayName)

Sets the displayName.

Parameters
displayName DisplayName or null to reset
Returns
  • this to enable chaining setters

public Email setLabel (String label)

Sets the label.

Parameters
label Label or null to reset
Returns
  • this to enable chaining setters

public Email setPrimary (Boolean primary)

Sets the whether this is the primary email address.

Parameters
primary Whether this is the primary email address or null to reset
Returns
  • this to enable chaining setters

public Email setRel (String rel)

Sets the email type.

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