uk.org.ogsadai.expression.arithmetic
Class Div

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

public class Div
extends BinaryExpression

Binary expression: div. Division.

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
Div(ArithmeticExpression child1, ArithmeticExpression child2)
          Constructor.
Div(ArithmeticExpression child1, ArithmeticExpression child2, Div div)
          Copy constructor.
 
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

Div

public Div(ArithmeticExpression child1,
           ArithmeticExpression child2)
Constructor.

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

Div

public Div(ArithmeticExpression child1,
           ArithmeticExpression child2,
           Div div)
Copy constructor.

Parameters:
child1 - left hand side operand
child2 - right hand side operand
div - copied div
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

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

accept

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