public class

Field

extends AbstractExtension
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.spreadsheet.Field

Class Overview

Describes a field.

Summary

Constants
String INDEX XML "index" attribute name
String NAME XML "name" attribute name
String XML_NAME XML element name
Fields
private String index Letter(s) or integer position of the column
private String name User defined name of the column
private String value Displayed value of the cell
[Expand]
Inherited Fields
From class com.google.gdata.data.AbstractExtension
Public Constructors
Field()
Default mutable constructor.
Field(String index, String name, String value)
Immutable constructor.
Public Methods
boolean equals(Object obj)
static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
Returns the extension description, specifying whether it is required, and whether it is repeatable.
String getIndex()
Returns the letter(s) or integer position of the column.
String getName()
Returns the user defined name of the column.
String getValue()
Returns the displayed value of the cell.
boolean hasIndex()
Returns whether it has the letter(s) or integer position of the column.
boolean hasName()
Returns whether it has the user defined name of the column.
boolean hasValue()
Returns whether it has the displayed value of the cell.
int hashCode()
void setIndex(String index)
Sets the letter(s) or integer position of the column.
void setName(String name)
Sets the user defined name of the column.
void setValue(String value)
Sets the displayed value of the cell.
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.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension

Constants

private static final String INDEX

XML "index" attribute name

Constant Value: "index"

private static final String NAME

XML "name" attribute name

Constant Value: "name"

static final String XML_NAME

XML element name

Constant Value: "field"

Fields

private String index

Letter(s) or integer position of the column

private String name

User defined name of the column

private String value

Displayed value of the cell

Public Constructors

public Field ()

Default mutable constructor.

public Field (String index, String name, String value)

Immutable constructor.

Parameters
index Letter(s) or integer position of the column.
name User defined name of the column.
value Displayed value of the cell.

Public Methods

public boolean equals (Object obj)

Parameters
obj

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

Returns the letter(s) or integer position of the column.

Returns
  • letter(s) or integer position of the column

public String getName ()

Returns the user defined name of the column.

Returns
  • user defined name of the column

public String getValue ()

Returns the displayed value of the cell.

Returns
  • displayed value of the cell

public boolean hasIndex ()

Returns whether it has the letter(s) or integer position of the column.

Returns
  • whether it has the letter(s) or integer position of the column

public boolean hasName ()

Returns whether it has the user defined name of the column.

Returns
  • whether it has the user defined name of the column

public boolean hasValue ()

Returns whether it has the displayed value of the cell.

Returns
  • whether it has the displayed value of the cell

public int hashCode ()

public void setIndex (String index)

Sets the letter(s) or integer position of the column.

Parameters
index Letter(s) or integer position of the column or null to reset

public void setName (String name)

Sets the user defined name of the column.

Parameters
name User defined name of the column or null to reset

public void setValue (String value)

Sets the displayed value of the cell.

Parameters
value Displayed value of the cell 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.