public class

Im

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

Class Overview

Describes an instant messaging address.

Summary

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

Fields

public static final AttributeKey<String> ADDRESS

IM address.

public static final ElementKey<Void, Im> KEY

The key for this element.

public static final AttributeKey<String> LABEL

Label.

public static final AttributeKey<Boolean> PRIMARY

Whether this is the primary instant messaging address.

public static final AttributeKey<String> PROTOCOL

Im protocol.

public static final AttributeKey<String> REL

Im type.

Public Constructors

public Im ()

Constructs an instance using the default key.

Protected Constructors

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

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

Parameters
key

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

Returns
  • IM address

public String getLabel ()

Returns the label.

Returns
  • label

public Boolean getPrimary ()

Returns the whether this is the primary instant messaging address.

Returns
  • whether this is the primary instant messaging address

public String getProtocol ()

Returns the im protocol.

Returns
  • im protocol

public String getRel ()

Returns the im type.

Returns
  • im type

public boolean hasAddress ()

Returns whether it has the IM address.

Returns
  • whether it has the IM address

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 instant messaging address.

Returns
  • whether it has the whether this is the primary instant messaging address

public boolean hasProtocol ()

Returns whether it has the im protocol.

Returns
  • whether it has the im protocol

public boolean hasRel ()

Returns whether it has the im type.

Returns
  • whether it has the im type

public int hashCode ()

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

Sets the IM address.

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

public Im setLabel (String label)

Sets the label.

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

public Im setPrimary (Boolean primary)

Sets the whether this is the primary instant messaging address.

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

public Im setProtocol (String protocol)

Sets the im protocol.

Parameters
protocol Im protocol or null to reset
Returns
  • this to enable chaining setters

public Im setRel (String rel)

Sets the im type.

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