|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Node
Nested Class Summary | |
---|---|
static interface |
Node.HookKey
Nodes can optional have hooks which add meta-data to the node. |
Method Summary | |
---|---|
java.util.Iterator<Node> |
childIterator()
Returns an Iterator which iterates over the children of the Node. |
java.lang.Iterable<Node> |
children()
Returns an Iterable object which can be used in a for/in loop. |
java.lang.Object |
getHook(Node.HookKey key)
Get the object associated with the key |
int |
getId()
|
java.lang.String |
getName()
Return the name associated with the node (if any). |
Operator |
getOperator()
Return the operator associated with a Node (if any) |
PostfixMathCommandI |
getPFMC()
Return the pfmc of a node (if any) |
java.lang.Object |
getValue()
Return the value associated with the node (if any). |
Variable |
getVar()
Return the variable associated with a Node (if any) |
java.util.Collection<Node.HookKey> |
hookKeys()
Get all the keys defined for this node. |
java.lang.Object |
jjtAccept(ParserVisitor visitor,
java.lang.Object data)
Accept the visitor. |
void |
jjtAddChild(Node n,
int i)
This method tells the node to add its argument to the node's list of children. |
void |
jjtClose()
This method is called after all the child nodes have been added. |
Node |
jjtGetChild(int i)
This method returns a child node. |
int |
jjtGetNumChildren()
Return the number of children the node has. |
Node |
jjtGetParent()
|
void |
jjtOpen()
This method is called after the node has been made the current node. |
void |
jjtSetParent(Node n)
This pair of methods are used to inform the node of its parent. |
java.lang.Object |
removeHook(Node.HookKey key)
Remove the key |
java.lang.Object |
setHook(Node.HookKey key,
java.lang.Object data)
Set the data associated with a given key |
Method Detail |
---|
void jjtOpen()
void jjtClose()
void jjtSetParent(Node n)
Node jjtGetParent()
void jjtAddChild(Node n, int i)
Node jjtGetChild(int i)
int jjtGetNumChildren()
java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data) throws JepException
JepException
java.lang.Object getValue()
java.lang.String getName()
PostfixMathCommandI getPFMC()
Operator getOperator()
Variable getVar()
java.lang.Iterable<Node> children()
for(Node child:node.children()) { ... }
java.util.Iterator<Node> childIterator()
int getId()
java.lang.Object setHook(Node.HookKey key, java.lang.Object data)
key
- defining the type of datadata
- actual object
java.lang.Object getHook(Node.HookKey key)
key
-
java.util.Collection<Node.HookKey> hookKeys()
java.lang.Object removeHook(Node.HookKey key)
key
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |