|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectserf.data.Attribute
public class Attribute
This class represents the attributes associated with a record. An attribute has a type and one or more values associated with it.
| Constructor Summary | |
|---|---|
Attribute(java.lang.String type)
|
|
Attribute(java.lang.String type,
java.lang.String... values)
|
|
| Method Summary | |
|---|---|
void |
addValue(java.lang.String text)
Adds a value for this attribute. |
void |
addValues(java.util.Collection<java.lang.String> values)
Adds a set of values to this attribute |
void |
clear()
Removes all the attribute values |
Attribute |
clone()
|
boolean |
equals(java.lang.Object o)
Test this object for equality with another object. |
java.lang.String |
getType()
Get the type of this attribute. |
int |
getValuesCount()
Gets the number of values for this attribute |
int |
hashCode()
|
java.util.Iterator<java.lang.String> |
iterator()
Retrieves an iterator for this attribute's values. |
void |
setType(java.lang.String type)
Sets the attribute type |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Attribute(java.lang.String type)
public Attribute(java.lang.String type,
java.lang.String... values)
| Method Detail |
|---|
public Attribute clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getType()
public void setType(java.lang.String type)
type - The new attribute typepublic java.util.Iterator<java.lang.String> iterator()
iterator in interface java.lang.Iterable<java.lang.String>public int getValuesCount()
public void addValue(java.lang.String text)
value - The new attribute value.public void addValues(java.util.Collection<java.lang.String> values)
values - the new valuespublic void clear()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
this object for equality with another object.
equals in class java.lang.Objectobject -
this and object have the same type and value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||