public class

Language

extends ExtensionPoint
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.contacts.Language

Class Overview

Contact's language field.

Summary

Constants
String CODE XML "code" attribute name
String LABEL XML "label" attribute name
String XML_NAME XML element name
Fields
private String code Code
private String label Label
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
Language()
Default mutable constructor.
Language(String code, String label)
Immutable constructor.
Public Methods
boolean equals(Object obj)
String getCode()
Returns the code.
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 hasCode()
Returns whether it has the code.
boolean hasLabel()
Returns whether it has the label.
int hashCode()
void setCode(String code)
Sets the code.
void setLabel(String label)
Sets the label.
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 CODE

XML "code" attribute name

Constant Value: "code"

private static final String LABEL

XML "label" attribute name

Constant Value: "label"

static final String XML_NAME

XML element name

Constant Value: "language"

Fields

private String code

Code

private String label

Label

Public Constructors

public Language ()

Default mutable constructor.

public Language (String code, String label)

Immutable constructor.

Parameters
code Code.
label Label.

Public Methods

public boolean equals (Object obj)

Parameters
obj

public String getCode ()

Returns the code.

Returns
  • code

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 hasCode ()

Returns whether it has the code.

Returns
  • whether it has the code

public boolean hasLabel ()

Returns whether it has the label.

Returns
  • whether it has the label

public int hashCode ()

public void setCode (String code)

Sets the code.

Parameters
code Code or null to reset

public void setLabel (String label)

Sets the label.

Parameters
label Label 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.