| Constructor and Description |
|---|
Token(java.lang.String text)
Create a new token.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
cast(java.lang.Object o)
Cast the specified object to a string.
|
java.lang.Object |
get(int index)
Get the child at the specified index.
|
java.lang.String |
getTokenText()
Treat this node as a token and get its text.
|
boolean |
hasTraversal()
Determine whether this node supports generic traversal of its
children.
|
boolean |
isToken()
Determine whether this node is a token.
|
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.
|
static boolean |
test(java.lang.Object o)
Determine whether the specified object represents a string.
|
Token |
toToken()
Get this node as a token.
|
add, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, getBoolean, getBooleanProperty, getGeneric, getList, getLocation, getName, getNode, getProperty, getString, getStringProperty, hasLocation, hasName, hasProperty, hasVariable, indexOf, isAnnotation, isEmpty, isGeneric, isList, iterator, lastIndexOf, properties, remove, removeProperty, setLocation, setLocation, setProperty, strip, toAnnotation, toList, toString, writepublic Token(java.lang.String text)
text - The text.public boolean isToken()
Nodepublic Token toToken()
Nodepublic java.lang.String getTokenText()
NodegetTokenText in class NodeNode.strip()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.test(Object),
cast(Object),
GNode.test(Object),
GNode.cast(Object)public java.lang.Object set(int index,
java.lang.Object value)
Nodepublic static final boolean test(java.lang.Object o)
o - The object.true if the specifed object is a string or a
possibly annotated token.public static final java.lang.String cast(java.lang.Object o)
o - The object.java.lang.ClassCastException - Signals that the object does not
describe a string.test(Object)Copyright © 2012. All Rights Reserved.