public class

Draft

extends Element
java.lang.Object
   ↳ com.google.gdata.model.Element
     ↳ com.google.gdata.model.atompub.Draft

Class Overview

Value of the app:draft tag.

Summary

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

Fields

public static final ElementKey<Draft.ValueDraft> KEY

The key for this element.

Public Constructors

public Draft ()

Constructs an instance using the default key.

public Draft (Draft.Value value)

Constructs a new instance with the given value.

Parameters
value Value.

Protected Constructors

protected Draft (ElementKey<Draft.Value, ? extends Draft> key)

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

Parameters
key

protected Draft (ElementKey<Draft.Value, ? extends Draft> 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 Draft.Value getValue ()

Returns the value.

Returns
  • value

public boolean hasValue ()

Returns whether it has the value.

Returns
  • whether it has the value

public int hashCode ()

public Draft 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 Draft setValue (Draft.Value value)

Sets the value.

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