|
||||||||||
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.NegationOperatorNode
public class NegationOperatorNode
Provides the implementation of the Negation [-] operator in the parsing tree when parsing expressions.
Constructor Summary | |
---|---|
NegationOperatorNode(ParserTreeNode right)
|
Method Summary | |
---|---|
int |
getPrecedence()
Returns the precedence of the node in the order of operations, when it should be evaluated in the tree. |
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 |
---|
isLeftOperandUnary, isParenthesized, left, left, right, right, setParenthesized |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NegationOperatorNode(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 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 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 |