public class

Country

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

Class Overview

The country name.

Summary

Fields
public static final AttributeKey<String> CODE The 3166-1 alpha-2 country code.
public static final ElementKey<String, Country> KEY The key for this element.
[Expand]
Inherited Fields
From class com.google.gdata.model.Element
Public Constructors
Country()
Constructs an instance using the default key.
Country(String value)
Constructs a new instance with the given value.
Protected Constructors
Country(ElementKey<String, ? extends Country> key)
Subclass constructor, allows subclasses to supply their own element key.
Country(ElementKey<String, ? extends Country> 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 getCode()
Returns the The 3166-1 alpha-2 country code.
String getValue()
Returns the value.
boolean hasCode()
Returns whether it has the The 3166-1 alpha-2 country code.
boolean hasValue()
Returns whether it has the value.
int hashCode()
Country lock()
Locks this element.
static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
Country setCode(String code)
Sets the The 3166-1 alpha-2 country code.
Country setValue(String value)
Sets the value.
[Expand]
Inherited Methods
From class com.google.gdata.model.Element
From class java.lang.Object

Fields

public static final AttributeKey<String> CODE

The 3166-1 alpha-2 country code.

public static final ElementKey<String, Country> KEY

The key for this element.

Public Constructors

public Country ()

Constructs an instance using the default key.

public Country (String value)

Constructs a new instance with the given value.

Parameters
value Value.

Protected Constructors

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

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

Parameters
key

protected Country (ElementKey<String, ? extends Country> 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 getCode ()

Returns the The 3166-1 alpha-2 country code.

Returns
  • The 3166-1 alpha-2 country code

public String getValue ()

Returns the value.

Returns
  • value

public boolean hasCode ()

Returns whether it has the The 3166-1 alpha-2 country code.

Returns
  • whether it has the The 3166-1 alpha-2 country code

public boolean hasValue ()

Returns whether it has the value.

Returns
  • whether it has the value

public int hashCode ()

public Country 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 Country setCode (String code)

Sets the The 3166-1 alpha-2 country code.

Parameters
code The 3166-1 alpha-2 country code or null to reset
Returns
  • this to enable chaining setters

public Country setValue (String value)

Sets the value.

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