public class TaggedName extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<TaggedName>
See TaggedNameHelper for constructing instances of this class from
BaseDataType
types. This split is needed due to the limitations of GWT serializer.
Modifier and Type | Field and Description |
---|---|
private java.lang.String[] |
data
Storage for data.
|
protected static int |
IDX_NAME
Defines the index of the NAME field.
|
protected static int |
IDX_TAG
Defines the index of the TAG field.
|
Constructor and Description |
---|
TaggedName()
Default constructor
|
TaggedName(int length,
java.lang.String... array)
Basic constructor.
|
TaggedName(java.lang.String... array)
Constructor from arrays.
|
TaggedName(java.lang.String name,
java.lang.String tag)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(TaggedName o)
Compares this instance of the class with another.
|
boolean |
equals(java.lang.Object o)
Compares this instance of the class with another.
|
java.lang.String |
get(int idx)
Get value at specified index.
|
java.lang.String[] |
getData()
Returns the containing data.
|
java.lang.String |
getName()
Convenience method for accessing the name.
|
java.lang.String |
getTag()
Convenience method for accessing the tag.
|
java.lang.Object |
getValueAt(int col)
Get the value for the specified column.
|
int |
hashCode()
Calculates the hash code for instances of this class.
|
int |
length()
Get the length of internal vector.
|
void |
set(int idx,
java.lang.String value)
Set value at specified index.
|
void |
setName(java.lang.String name)
Convenience method for accessing the name.
|
void |
setTag(java.lang.String tag)
Convenience method for accessing the tag.
|
java.lang.String |
toString()
Get a string representation of this object (name of the object).
|
protected static final int IDX_NAME
protected static final int IDX_TAG
private java.lang.String[] data
public TaggedName()
public TaggedName(int length, java.lang.String... array)
length
- Length of internal array.array
- Initial values.public TaggedName(java.lang.String... array)
array
- public TaggedName(java.lang.String name, java.lang.String tag)
name
- tag
- public int compareTo(TaggedName o)
compareTo
in interface java.lang.Comparable<TaggedName>
o
- Object to compare with.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- Object to compare with.true
when both are equalpublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object getValueAt(int col)
col
- Column of interest.public void setName(java.lang.String name)
name
- The name to set.public java.lang.String getName()
public void setTag(java.lang.String tag)
tag
- The tag to set.public java.lang.String getTag()
public void set(int idx, java.lang.String value)
idx
- Value index.value
- Value to store.public java.lang.String get(int idx)
idx
- Value index.public int length()
public java.lang.String[] getData()