public class

Im

extends ExtensionPoint
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.extensions.Im

Class Overview

Describes an instant messaging address.

Summary

Nested Classes
class Im.Protocol Im protocol. 
class Im.Rel Im type. 
Constants
String ADDRESS XML "address" attribute name
String LABEL XML "label" attribute name
String PRIMARY XML "primary" attribute name
String PROTOCOL XML "protocol" attribute name
String REL XML "rel" attribute name
String XML_NAME XML element name
Fields
private String address IM address
private String label Label
private Boolean primary Whether this is the primary instant messaging address
private String protocol Im protocol
private String rel Im type
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
Im()
Default mutable constructor.
Im(String address, String label, Boolean primary, String protocol, String rel)
Immutable constructor.
Public Methods
boolean equals(Object obj)
String getAddress()
Returns the IM address.
static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
Returns the extension description, specifying whether it is required, and whether it is repeatable.
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()
void setAddress(String address)
Sets the IM address.
void setLabel(String label)
Sets the label.
void setPrimary(Boolean primary)
Sets the whether this is the primary instant messaging address.
void setProtocol(String protocol)
Sets the im protocol.
void setRel(String rel)
Sets the im type.
String toString()
Protected Methods
void consumeAttributes(AttributeHelper helper)
Consumes attributes from the attribute helper.
void putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator.
void validate()
Checks the attributes to see if there are any problems.
[Expand]
Inherited Methods
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension

Constants

private static final String ADDRESS

XML "address" attribute name

Constant Value: "address"

private static final String LABEL

XML "label" attribute name

Constant Value: "label"

private static final String PRIMARY

XML "primary" attribute name

Constant Value: "primary"

private static final String PROTOCOL

XML "protocol" attribute name

Constant Value: "protocol"

private static final String REL

XML "rel" attribute name

Constant Value: "rel"

static final String XML_NAME

XML element name

Constant Value: "im"

Fields

private String address

IM address

private String label

Label

private Boolean primary

Whether this is the primary instant messaging address

private String protocol

Im protocol

private String rel

Im type

Public Constructors

public Im ()

Default mutable constructor.

public Im (String address, String label, Boolean primary, String protocol, String rel)

Immutable constructor.

Parameters
address IM address.
label Label.
primary Whether this is the primary instant messaging address.
protocol Im protocol.
rel Im type.

Public Methods

public boolean equals (Object obj)

Parameters
obj

public String getAddress ()

Returns the IM address.

Returns
  • IM address

public static ExtensionDescription getDefaultDescription (boolean required, boolean repeatable)

Returns the extension description, specifying whether it is required, and whether it is repeatable.

Parameters
required Whether it is required
repeatable Whether it is repeatable
Returns
  • extension description

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

Sets the IM address.

Parameters
address IM address or null to reset

public void setLabel (String label)

Sets the label.

Parameters
label Label or null to reset

public void 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

public void setProtocol (String protocol)

Sets the im protocol.

Parameters
protocol Im protocol or null to reset

public void setRel (String rel)

Sets the im type.

Parameters
rel Im type or null to reset

public String toString ()

Protected Methods

protected void consumeAttributes (AttributeHelper helper)

Consumes attributes from the attribute helper. May also use consumeContent(boolean) to consume the element's text content. Called from getHandler(ExtensionProfile, String, String, Attributes). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
helper Attribute helper

protected void putAttributes (AttributeGenerator generator)

Puts attributes into the attribute generator. Called from generate(XmlWriter, ExtensionProfile). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
generator Attribute generator

protected void validate ()

Checks the attributes to see if there are any problems. Default implementation does nothing, though generally this is discouraged unless there really are no restrictions.