public abstract class MultiOperandNumericFunction extends java.lang.Object implements Function
Modifier and Type | Class and Description |
---|---|
static class |
MultiOperandNumericFunction.Policy |
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 |
isHiddenRowCounted() |
boolean |
isSubtotalCounted()
Whether to count nested subtotals.
(是否计算嵌套小计。)
|
void |
setBlankEvalPolicy(MultiOperandNumericFunction.Policy policy) |
void |
setMissingArgPolicy(MultiOperandNumericFunction.Policy policy) |
protected MultiOperandNumericFunction(boolean isReferenceBoolCounted, boolean isBlankCounted)
public void setMissingArgPolicy(MultiOperandNumericFunction.Policy policy)
public void setBlankEvalPolicy(MultiOperandNumericFunction.Policy policy)
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
.
(args - 评估的函数参数。空值用 BlankEval 或 MissingArgEval 表示,绝不为 null。)
srcCellRow
- row index of the cell containing the formula under evaluation
(srcCellRow - 包含计算公式的单元格的行索引)
srcCellCol
- column index of the cell containing the formula under evaluation
(srcCellCol - 包含正在评估的公式的单元格的列索引)
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
.
(评估结果,可能是 ErrorEval,绝不为空。注意 - Excel 使用错误代码 #NUM!而不是 IEEE NaN,因此当数值函数计算为 Double.NaN 时,请务必将结果转换为 ErrorEval.NUM_ERROR。)
protected abstract double evaluate(double[] values) throws EvaluationException
EvaluationException
(评估异常)
protected int getMaxNumOperands()
protected final double[] getNumberArray(ValueEval[] operands) throws EvaluationException
null
.
(返回一个双精度数组,其中包含操作数列表中数字单元格的值。空白和空白等效单元格将被忽略。错误操作数或包含被视为无效类型的操作数的单元格将导致#VALUE! excel 中的错误导致此函数返回 null。)
null
(从不为空)
EvaluationException
(评估异常)
public boolean isSubtotalCounted()
public boolean isHiddenRowCounted()
Subtotal
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.