org.exolab.castor.jdo.oql
public final class ParseTreeNode extends Object
Version: $Revision: 5951 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Constructor Summary | |
---|---|
ParseTreeNode(ParseTreeNode parent, Token token)
Creates a new Node with supplied parent and token.
| |
ParseTreeNode(Token token)
Creates a new root Node with supplied token.
|
Method Summary | |
---|---|
void | addChild(ParseTreeNode child)
Adds a new node as a child of this node. |
Iterator | children()
Accessor method for an iteration of this nodes children.
|
ParseTreeNode | getChild(int index)
Accessor method for individual children of this node.
|
int | getChildCount()
Accessor method for the number of children of this node.
|
ParseTreeNode | getParent()
Accessor method for the parent of this node.
|
Token | getToken()
Accessor method for the token.
|
boolean | isLeaf()
Specifies whether this node is a leaf.
|
boolean | isRoot()
Specifies whether this node is the root of a tree.
|
void | setParent(ParseTreeNode parent)
Changes the parent of this node.
|
String | toString() |
String | toStringEx() |
Parameters: parent The parent of this node (null for root) token The token data in this node
Parameters: token The token data in this node
Parameters: child The new child
Returns: An Iterator of children.
Parameters: index the index of the child to retrieve.
Returns: the index child of this node.
Returns: the number of children of this node.
Returns: The parent of this node.
Returns: The token which is the datum of this node.
Returns: True if the node does not have any children, otherwise false.
Returns: True if the node does not have a parent, otherwise false.
Parameters: parent The new parent.