|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.ss.formula.functions.MultiOperandNumericFunction
public abstract class MultiOperandNumericFunction
This is the super class for all excel function evaluator classes that take variable number of operands, and where the order of operands does not matter
Constructor Summary | |
---|---|
protected |
MultiOperandNumericFunction(boolean isReferenceBoolCounted,
boolean isBlankCounted)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected MultiOperandNumericFunction(boolean isReferenceBoolCounted, boolean isBlankCounted)
Method Detail |
---|
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 evaluation
ErrorEval
, 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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |