|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lexonics.edsel.Attribute
An Edsel attribute.
An Attribute has a name and a value list.
The name is a valid Edsel identifier;
that is, it is a non-null, non-empty String
that contains no characters other than
upper- and lowercase ASCII letters, digits, and hyphens.
Names beginning with hyphens are reserved.
By convention, attribute names are lowercase words
separated by hyphens.
The value list is a non-null List of Strings.
Attributes are immutable.
| Constructor Summary | |
Attribute(String name)
Construct an Attribute with a given name and an empty value list. |
|
Attribute(String name,
List valueList)
Construct an Attribute with a given name and value list. |
|
Attribute(String name,
String value)
Construct an Attribute with a given name and a value list containing a single value. |
|
| Method Summary | |
boolean |
equals(Object o)
Compare a given object with this Attribute for equality. |
int |
hashCode()
Return the hash code value for this Attribute. |
String |
name()
Return the name of this Attribute. |
String |
toString()
Return a string representation of this Attribute. |
List |
valueList()
Return a shallow copy of the value list of this Attribute. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Attribute(String name)
name - The name of the Attribute. Must be a valid Edsel identifier.
IllegalArgumentException - The name is not a valid Edsel identifier.
public Attribute(String name,
String value)
name - The name of the Attribute. Must be a valid Edsel identifier.value - The value. Must be non-null.
IllegalArgumentException - The name is not a valid Edsel identifier,
or the value is null.
public Attribute(String name,
List valueList)
name - The name of the Attribute. Must be a valid Edsel identifier.valueList - The value list of the Attribute.
Must be a non-null List of Strings.
This list is copied by a shallow copy, to guarantee Attribute immutability.
IllegalArgumentException - The name is not a valid Edsel identifier,
the value list is null,
or an element of the value list is not a String.| Method Detail |
public boolean equals(Object o)
true if the given object is also an Attribute,
and the two Attributes have equal names and value lists.
o - The object.
true if the object is equal to this Attribute.public int hashCode()
public String name()
public String toString()
public List valueList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||