org.jfree.formula.operators
Class AbstractNumericOperator

java.lang.Object
  extended by org.jfree.formula.operators.AbstractNumericOperator
All Implemented Interfaces:
java.io.Serializable, InfixOperator
Direct Known Subclasses:
AddOperator, DivideOperator, MultiplyOperator, PowerOperator, SubtractOperator

public abstract class AbstractNumericOperator
extends java.lang.Object
implements InfixOperator

Creation-Date: 10.04.2007, 15:02:39

Author:
Thomas Morgner
See Also:
Serialized Form

Field Summary
protected static java.lang.Number ZERO
           
 
Constructor Summary
protected AbstractNumericOperator()
           
 
Method Summary
 TypeValuePair evaluate(FormulaContext context, TypeValuePair value1, TypeValuePair value2)
          Evaluates the comptuation for both parameters.
protected abstract  java.lang.Number evaluate(java.lang.Number number1, java.lang.Number number2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jfree.formula.operators.InfixOperator
getLevel, isAssociative, isLeftOperation
 

Field Detail

ZERO

protected static final java.lang.Number ZERO
Constructor Detail

AbstractNumericOperator

protected AbstractNumericOperator()
Method Detail

evaluate

public final TypeValuePair evaluate(FormulaContext context,
                                    TypeValuePair value1,
                                    TypeValuePair value2)
                             throws EvaluationException
Description copied from interface: InfixOperator
Evaluates the comptuation for both parameters. This method must never return null.

Specified by:
evaluate in interface InfixOperator
Returns:
Throws:
EvaluationException

evaluate

protected abstract java.lang.Number evaluate(java.lang.Number number1,
                                             java.lang.Number number2)
                                      throws EvaluationException
Throws:
EvaluationException