Class AbstractNumericOperator
- java.lang.Object
-
- org.pentaho.reporting.libraries.formula.operators.AbstractNumericOperator
-
- All Implemented Interfaces:
Serializable
,InfixOperator
- Direct Known Subclasses:
AddOperator
,DivideOperator
,MultiplyOperator
,PowerOperator
,SubtractOperator
public abstract class AbstractNumericOperator extends Object implements InfixOperator
Creation-Date: 10.04.2007, 15:02:39- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNumericOperator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Number
evaluate(Number number1, Number number2)
TypeValuePair
evaluate(FormulaContext context, TypeValuePair value1, TypeValuePair value2)
Evaluates the comptuation for both parameters.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.reporting.libraries.formula.operators.InfixOperator
getLevel, isAssociative, isLeftOperation
-
-
-
-
Field Detail
-
ZERO
protected static final Number ZERO
-
-
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 interfaceInfixOperator
- Returns:
- Throws:
EvaluationException
-
evaluate
protected abstract Number evaluate(Number number1, Number number2) throws EvaluationException
- Throws:
EvaluationException
-
-