uk.org.ogsadai.expression.arithmetic
Class Plus

java.lang.Object
  extended by uk.org.ogsadai.expression.arithmetic.BinaryExpression
      extended by uk.org.ogsadai.expression.arithmetic.Plus
All Implemented Interfaces:
ArithmeticExpression

public class Plus
extends BinaryExpression

Plus expression.

Author:
The OGSA-DAI Project Team.

Field Summary
 
Fields inherited from class uk.org.ogsadai.expression.arithmetic.BinaryExpression
mContextType, mEval, mLeftChild, mOriginalType, mRightChild, mType
 
Constructor Summary
Plus(ArithmeticExpression child1, ArithmeticExpression child2)
          Constructs a new expression with the given operands.
Plus(ArithmeticExpression child1, ArithmeticExpression child2, Plus plus)
          Constructs a copy of the given plus expression with the given operands.
 
Method Summary
 void accept(ArithmeticExpressionVisitor visitor)
          Accept an arithmetic expression visitor.
 java.lang.Number localEvaluate(java.lang.Number value1, java.lang.Number value2)
          Performs operation specific evaluation.
protected  void printOperator(java.lang.StringBuffer buf)
          Append the operator name (e.g.
 
Methods inherited from class uk.org.ogsadai.expression.arithmetic.BinaryExpression
configure, configure, evaluate, getChildren, getLeftExpression, getMetadata, getResult, getRightExpression, resetType, setContextType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Plus

public Plus(ArithmeticExpression child1,
            ArithmeticExpression child2)
Constructs a new expression with the given operands.

Parameters:
child1 - left hand operand
child2 - right hand operand

Plus

public Plus(ArithmeticExpression child1,
            ArithmeticExpression child2,
            Plus plus)
Constructs a copy of the given plus expression with the given operands.

Parameters:
child1 - left hand operand
child2 - right hand operand
plus - expression to copy
Method Detail

localEvaluate

public java.lang.Number localEvaluate(java.lang.Number value1,
                                      java.lang.Number value2)
Performs operation specific evaluation.

Specified by:
localEvaluate in class BinaryExpression
Parameters:
value1 - left hand side value
value2 - right hand side value
Returns:
result of the evaluation

accept

public void accept(ArithmeticExpressionVisitor visitor)
Accept an arithmetic expression visitor.


printOperator

protected void printOperator(java.lang.StringBuffer buf)
Append the operator name (e.g. "+") to the given string buffer.

Specified by:
printOperator in class BinaryExpression
Parameters:
buf - buffer