net.scheinerman.phoenix.interpreter.parser.operators
Class AssignRoundOperatorNode

java.lang.Object
  extended by net.scheinerman.phoenix.interpreter.parser.operators.OperatorNode
      extended by net.scheinerman.phoenix.interpreter.parser.operators.AssignRoundOperatorNode
All Implemented Interfaces:
ParserTreeNode

public class AssignRoundOperatorNode
extends OperatorNode

Provides the implementation of the AssignRound [#=] operator in the parsing tree when parsing expressions.

Since:
1.5
Version:
1.0
Author:
Jonah Scheinerman

Constructor Summary
AssignRoundOperatorNode(ParserTreeNode left, 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.
 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.
 
Methods inherited from class net.scheinerman.phoenix.interpreter.parser.operators.OperatorNode
isLeftOperandUnary, isParenthesized, isUnary, left, left, right, right, setParenthesized, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssignRoundOperatorNode

public AssignRoundOperatorNode(ParserTreeNode left,
                               ParserTreeNode right)
Method Detail

operate

public Variable operate()
Description copied from class: OperatorNode
Parses this operator, by operating on the left and right hand arguments and then combining the results in some implementation specific manner.

Specified by:
operate in interface ParserTreeNode
Overrides:
operate in class OperatorNode
Returns:
The variable result of the operation.

operator

public java.lang.String operator()
Description copied from class: OperatorNode
Returns the string representation of this operator. For example, in the case of the add operator, the string "+" is returned.

Specified by:
operator in class OperatorNode
Returns:
A string representation of this operator symbol.

getPrecedence

public int getPrecedence()
Description copied from interface: ParserTreeNode
Returns the precedence of the node in the order of operations, when it should be evaluated in the tree. The precedence is an integer, the higher the integer, the higher the precedence, meaning that this node will be evaluated sooner than those of lower precedence.

Specified by:
getPrecedence in interface ParserTreeNode
Specified by:
getPrecedence in class OperatorNode
Returns:
A number representing the precedence of this node.