|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.scheinerman.phoenix.interpreter.parser.DataNode
public class DataNode
Represents a variable or a literal in the parsing of Phoenix expression tree.
Field Summary | |
---|---|
private Variable |
data
The data held by this node. |
private boolean |
parenthesized
Whether or not this node was encapsulated by parentheses. |
Constructor Summary | |
---|---|
DataNode(Variable data)
Creates a new data node which holds a variable as a piece of data to be used in the parsing tree. |
Method Summary | |
---|---|
int |
getPrecedence()
Returns the precedence of the node in the order of operations, when it should be evaluated in the tree. |
boolean |
isParenthesized()
Returns true or false based on whether or not this node was encapsulated by parentheses. |
ParserTreeNode |
left()
Should be implemented to return the left child node of the current node. |
Variable |
operate()
Returns the data encapsulated by this node. |
ParserTreeNode |
right()
Should be implemented to return the right child node of the current node. |
void |
setParenthesized(boolean parenthesized)
Sets whether or not this node is encapsulated by parentheses. |
java.lang.String |
toString()
Returns a string version of the data held by this node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private boolean parenthesized
private Variable data
Constructor Detail |
---|
public DataNode(Variable data)
data
- - The variable datum to be held by this node.Method Detail |
---|
public boolean isParenthesized()
ParserTreeNode
isParenthesized
in interface ParserTreeNode
public void setParenthesized(boolean parenthesized)
ParserTreeNode
setParenthesized
in interface ParserTreeNode
parenthesized
- - true
if this node is surrounded by parentheses, false
if not.public final ParserTreeNode left()
ParserTreeNode
left
in interface ParserTreeNode
null
public final ParserTreeNode right()
ParserTreeNode
right
in interface ParserTreeNode
null
public final Variable operate()
operate
in interface ParserTreeNode
public final java.lang.String toString()
toString
in class java.lang.Object
public final int getPrecedence()
ParserTreeNode
getPrecedence
in interface ParserTreeNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |