public final class

Attribute

extends Object
java.lang.Object
   ↳ com.google.gdata.model.Attribute

Class Overview

A data attribute in an instance document. Contains the key that identifies the attribute (name + type) and the value of the attribute.

Summary

Fields
private final AttributeKey<?> key Key to this attribute.
private boolean locked Indicates that the attribute has been locked.
private Object value Untyped attribute value.
Public Methods
AttributeKey<?> getAttributeKey()
Returns the attribute key of this attribute.
Object getValue()
Returns the untyped attribute value.
boolean isLocked()
Returns true if this attribute has been locked using lock().
Attribute lock()
Locks this attribute.
Attribute setValue(Object value)
Sets the value of the attribute.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private final AttributeKey<?> key

Key to this attribute.

private boolean locked

Indicates that the attribute has been locked.

private Object value

Untyped attribute value.

Public Methods

public AttributeKey<?> getAttributeKey ()

Returns the attribute key of this attribute.

public Object getValue ()

Returns the untyped attribute value.

Returns
  • untyped attribute value

public boolean isLocked ()

Returns true if this attribute has been locked using lock(). Once an attribute has been locked it cannot be unlocked.

public Attribute lock ()

Locks this attribute. Once an attribute has been locked its value cannot be modified.

public Attribute setValue (Object value)

Sets the value of the attribute.

Parameters
value Attribute value
Throws
NullPointerException if the value was null
IllegalArgumentException if the value is not of a valid type
IllegalStateException if this attribute is locked

public String toString ()