|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.percederberg.grammatica.parser.Node
An abstract parse tree node. This class is inherited by all nodes in the parse tree, i.e. by the token and production classes.
Constructor Summary | |
Node()
|
Method Summary | |
void |
addValue(java.lang.Object value)
Adds a computed value to this node. |
void |
addValues(java.util.Vector values)
Adds a set of computed values to this node. |
java.util.Vector |
getAllValues()
Returns the vector with all the computed values for this node. |
Node |
getChildAt(int index)
Returns the child node with the specified index. |
int |
getChildCount()
Returns the number of child nodes. |
abstract int |
getId()
Returns the node type id. |
Node |
getParent()
Returns the parent node. |
java.lang.Object |
getValue(int pos)
Returns a computed value of this node, if previously set. |
int |
getValueCount()
Returns the number of computed values associated with this node. |
void |
printTo(java.io.PrintStream out)
Prints this node and all subnodes to the specified output stream. |
void |
printTo(java.io.PrintWriter out)
Prints this node and all subnodes to the specified output stream. |
void |
removeAllValues()
Removes all computed values stored in this node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Node()
Method Detail |
public abstract int getId()
public Node getParent()
public int getChildCount()
public Node getChildAt(int index)
index
- the child index, 0 <= index < count
public int getValueCount()
public java.lang.Object getValue(int pos)
pos
- the value position, 0 <= pos < count
public java.util.Vector getAllValues()
public void addValue(java.lang.Object value)
value
- the node valuepublic void addValues(java.util.Vector values)
values
- the vector with node valuespublic void removeAllValues()
public void printTo(java.io.PrintStream out)
out
- the output stream to usepublic void printTo(java.io.PrintWriter out)
out
- the output stream to use
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |