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 |
isHiddenCounted()
Whether to count hidden reference
|
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 Function
args
- 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
EvaluationException
protected int getMaxNumOperands()
protected final double[] getNumberArray(ValueEval[] operands) throws EvaluationException
null
.null
EvaluationException
public boolean isSubtotalCounted()
public boolean isHiddenCounted()
Copyright © 2005-2010 Potix Corporation. All Rights Reserved.