|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ParserTreeNode
Represents a node that is part of the parsing of an expression tree in Phoenix. When Phoenix parses
an expression, the values, operators and functions are combined into a mostly binary tree which is
then parsed to obtain the value of the expression. This parsing is done via the operate()
method. This method is implemented to return the value of a variable or perform the operations of the
left and right subtrees.
Field Summary | |
---|---|
static boolean |
parenthesized
Whether or not this node was encapsulated by parentheses. |
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()
Operates on this node to provide some sort of variable result dependent on the expression being parsed. |
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. |
Field Detail |
---|
static final boolean parenthesized
Method Detail |
---|
ParserTreeNode left()
ParserTreeNode right()
Variable operate()
int getPrecedence()
boolean isParenthesized()
void setParenthesized(boolean parenthesized)
parenthesized
- - true
if this node is surrounded by parentheses, false
if not.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |