public abstract class MultiOperandNumericFunction extends java.lang.Object implements Function
| Modifier | Constructor and Description |
|---|---|
protected |
MultiOperandNumericFunction(boolean isReferenceBoolCounted,
boolean isBlankCounted) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract double |
evaluate(double[] values) |
ValueEval |
evaluate(ValueEval[] args,
int srcCellRow,
int srcCellCol) |
protected int |
getMaxNumOperands()
Maximum number of operands accepted by this function.
|
protected double[] |
getNumberArray(ValueEval[] operands)
Returns a double array that contains values for the numeric cells
from among the list of operands.
|
boolean |
isSubtotalCounted()
Whether to count nested subtotals.
|
protected MultiOperandNumericFunction(boolean isReferenceBoolCounted,
boolean isBlankCounted)
public final ValueEval evaluate(ValueEval[] args, int srcCellRow, int srcCellCol)
evaluate in interface Functionargs - the evaluated function arguments. Empty values are represented with
BlankEval or MissingArgEval, never null.srcCellRow - row index of the cell containing the formula under evaluationsrcCellCol - 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.protected abstract double evaluate(double[] values)
throws EvaluationException
EvaluationExceptionprotected int getMaxNumOperands()
protected final double[] getNumberArray(ValueEval[] operands) throws EvaluationException
null.nullEvaluationExceptionpublic boolean isSubtotalCounted()
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.