|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxtc.tree.Node
xtc.tree.Attribute
public class Attribute
A name/value pair.
| Constructor Summary | |
|---|---|
Attribute(java.lang.String name)
Create a new attribute with the specified name. |
|
Attribute(java.lang.String name,
java.lang.Object value)
Create a new attribute with the specified name and value. |
|
| Method Summary | |
|---|---|
static boolean |
areEquivalent(java.util.List<Attribute> l1,
java.util.List<Attribute> l2)
Determine whether the specified lists of attributes are equivalent. |
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
get(int index)
Get the child at the specified index. |
static Attribute |
get(java.lang.String name,
java.util.List<Attribute> list)
Get the attribute with the specified name from the specified list. |
java.lang.String |
getName()
Get the name. |
java.lang.Object |
getValue()
Get the value. |
int |
hashCode()
|
boolean |
hasTraversal()
Determine whether this node supports generic traversal of its children. |
java.lang.Object |
set(int index,
java.lang.Object value)
Set the child at the specified index to the specified value. |
int |
size()
Get the number of children. |
void |
write(java.lang.Appendable out)
Write a human readable representation to the specified appendable. |
| Methods inherited from class xtc.tree.Node |
|---|
add, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, getBoolean, getBooleanProperty, getGeneric, getList, getLocation, getNode, getProperty, getString, getStringProperty, getTokenText, hasLocation, hasName, hasProperty, hasVariable, indexOf, isAnnotation, isEmpty, isGeneric, isList, isToken, iterator, lastIndexOf, properties, remove, removeProperty, setLocation, setLocation, setProperty, strip, toAnnotation, toList, toString, toToken |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Attribute(java.lang.String name)
null.
name - The name.
public Attribute(java.lang.String name,
java.lang.Object value)
name - The name.value - The value.| Method Detail |
|---|
public boolean hasTraversal()
Nodefalse.
hasTraversal in class Nodetrue if this node supports generic traversal
of its children.public int size()
Node
size in class Nodepublic java.lang.Object get(int index)
Node
get in class Nodeindex - The index.
Token.test(Object),
Token.cast(Object),
GNode.test(Object),
GNode.cast(Object)
public java.lang.Object set(int index,
java.lang.Object value)
Node
set in class Nodeindex - The index.value - The new value.
public java.lang.String getName()
getName in class Nodepublic java.lang.Object getValue()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
public void write(java.lang.Appendable out)
throws java.io.IOException
NodeObject.toString().
write in class Nodeout - The appendable.
java.io.IOException - Signals an I/O error.
public static Attribute get(java.lang.String name,
java.util.List<Attribute> list)
name - The name.list - The list.
null if the
list is null or contains no such attribute.
public static boolean areEquivalent(java.util.List<Attribute> l1,
java.util.List<Attribute> l2)
l1 - The first list.l2 - The second list.
true if the two lists are equivalent, that is,
contain the same attributes in some order.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||