public abstract class TwoOperandNumericOperation extends Fixed2ArgFunction implements ArrayFunction
Modifier and Type | Field and Description |
---|---|
static Function |
AddEval |
static Function |
DivideEval |
static Function |
MultiplyEval |
static Function |
PowerEval |
static Function |
SubtractEval |
Constructor and Description |
---|
TwoOperandNumericOperation() |
Modifier and Type | Method and Description |
---|---|
protected abstract double |
evaluate(double d0,
double d1) |
ValueEval |
evaluate(int srcRowIndex,
int srcColumnIndex,
ValueEval arg0,
ValueEval arg1)
|
ValueEval |
evaluateArray(ValueEval[] args,
int srcRowIndex,
int srcColumnIndex) |
protected double |
singleOperandEvaluate(ValueEval arg,
int srcCellRow,
int srcCellCol) |
evaluate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
_evaluateOneArrayArg, _evaluateTwoArrayArgs, evaluateOneArrayArg, evaluateTwoArrayArgs
public static final Function AddEval
public static final Function DivideEval
public static final Function MultiplyEval
public static final Function PowerEval
public static final Function SubtractEval
protected final double singleOperandEvaluate(ValueEval arg, int srcCellRow, int srcCellCol) throws EvaluationException
EvaluationException
public ValueEval evaluateArray(ValueEval[] args, int srcRowIndex, int srcColumnIndex)
evaluateArray
in interface ArrayFunction
args
- the evaluated function arguments. Empty values are represented with
BlankEval
or MissingArgEval
, never null
.srcRowIndex
- row index of the cell containing the formula under evaluationsrcColumnIndex
- column index of the cell containing the formula under evaluationErrorEval
, never null
.
Note - Excel uses the error code #NUM! instead of IEEE NaN, so when
numeric functions evaluate to Double.NaN
be sure to translate the result to ErrorEval.NUM_ERROR
.public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1)
Function2Arg
evaluate
in interface Function2Arg
protected abstract double evaluate(double d0, double d1) throws EvaluationException
EvaluationException
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.