| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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, toTokenpublic 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.public boolean hasTraversal()
Nodefalse.hasTraversal in class Nodetrue if this node supports generic traversal
of its children.public int size()
Nodepublic java.lang.Object get(int index)
Nodeget 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)
Nodepublic java.lang.String getName()
public java.lang.Object getValue()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic void write(java.lang.Appendable out)
throws java.io.IOException
NodeObject.toString().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.Copyright © 2014. All Rights Reserved.