|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.scheinerman.phoenix.interpreter.parser.operators.OperatorNode
net.scheinerman.phoenix.interpreter.parser.operators.FunctionOperatorNode
public class FunctionOperatorNode
Provides the implementation of the Function operator in the parsing tree when parsing expressions.
Field Summary | |
---|---|
private Variable[] |
af
|
private Variable[] |
b4
|
private Function |
function
|
Constructor Summary | |
---|---|
FunctionOperatorNode(Function function,
ParserTreeNode left,
ParserTreeNode right)
|
Method Summary | |
---|---|
Function |
getFunction()
|
int |
getPrecedence()
Returns the precedence of the node in the order of operations, when it should be evaluated in the tree. |
boolean |
isLeftOperandUnary()
Determines if, for a unary operator the operand is on the right or the left. |
boolean |
isUnary()
Returns whether or not this operator is unary, meaning that it only accepts one operand on the right or the left. |
Variable |
operate()
Parses this operator, by operating on the left and right hand arguments and then combining the results in some implementation specific manner. |
java.lang.String |
operator()
Returns the string representation of this operator. |
java.lang.String |
toString()
Returns a string in the form: "(" + left().toString() + operator() + right().toString() + ")" . |
Methods inherited from class net.scheinerman.phoenix.interpreter.parser.operators.OperatorNode |
---|
isParenthesized, left, left, right, right, setParenthesized |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Function function
private Variable[] b4
private Variable[] af
Constructor Detail |
---|
public FunctionOperatorNode(Function function, ParserTreeNode left, ParserTreeNode right)
Method Detail |
---|
public Variable operate()
OperatorNode
operate
in interface ParserTreeNode
operate
in class OperatorNode
public java.lang.String operator()
OperatorNode
"+"
is returned.
operator
in class OperatorNode
public Function getFunction()
public int getPrecedence()
ParserTreeNode
getPrecedence
in interface ParserTreeNode
getPrecedence
in class OperatorNode
public boolean isUnary()
OperatorNode
isLeftOperandUnary()
method is used.
By default, this method returns false
.
isUnary
in class OperatorNode
true
if it is unary, false
if not.public boolean isLeftOperandUnary()
OperatorNode
true
, then the operator has a left-hand operand, if false
, the operator
has a right-hand operand.
isLeftOperandUnary
in class OperatorNode
true
if this operator has a left-hand, false
if it has a right-hand
operand.public java.lang.String toString()
OperatorNode
"(" + left().toString() + operator() + right().toString() + ")"
.
toString
in class OperatorNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |