org.apache.poi.hssf.record.formula.functions
Class MultiOperandNumericFunction
java.lang.Object
org.apache.poi.hssf.record.formula.functions.NumericFunction
org.apache.poi.hssf.record.formula.functions.MultiOperandNumericFunction
- All Implemented Interfaces:
- Function
- Direct Known Subclasses:
- Avedev, Average, Devsq, Large, Max, Maxa, Median, Min, Mina, Mode, Product, Small, Stdev, Sum, Sumsq
public abstract class MultiOperandNumericFunction
- extends NumericFunction
- Author:
- Amol S. Deshmukh < amolweb at ya hoo dot com >
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
Fields inherited from class org.apache.poi.hssf.record.formula.functions.NumericFunction |
E, PI |
Method Summary |
protected static boolean |
areSubArraysConsistent(double[][] values)
|
protected int |
getMaxNumOperands()
Maximum number of operands accepted by this function. |
protected double[] |
getNumberArray(Eval[] operands,
int srcRow,
short srcCol)
Returns a double array that contains values for the numeric cells
from among the list of operands. |
protected double[] |
getNumberArray(Eval operand,
int srcRow,
short srcCol)
Same as getNumberArray(Eval[], int, short) except that this
takes Eval instead of Eval[]. |
protected ValueEvalToNumericXlator |
getXlator()
this is the default impl for the factory method getXlator
of the super class NumericFunction. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.poi.hssf.record.formula.functions.Function |
evaluate |
MultiOperandNumericFunction
public MultiOperandNumericFunction()
getXlator
protected ValueEvalToNumericXlator getXlator()
- this is the default impl for the factory method getXlator
of the super class NumericFunction. Subclasses can override this method
if they desire to return a different ValueEvalToNumericXlator instance
than the default.
- Overrides:
getXlator
in class NumericFunction
getMaxNumOperands
protected int getMaxNumOperands()
- Maximum number of operands accepted by this function.
Subclasses may override to change default value.
getNumberArray
protected double[] getNumberArray(Eval[] operands,
int srcRow,
short srcCol)
- Returns a double array that contains values for the numeric cells
from among the list of operands. Blanks and Blank equivalent cells
are ignored. Error operands or cells containing operands of type
that are considered invalid and would result in #VALUE! error in
excel cause this function to return null.
- Parameters:
operands
- srcRow
- srcCol
-
getNumberArray
protected double[] getNumberArray(Eval operand,
int srcRow,
short srcCol)
- Same as getNumberArray(Eval[], int, short) except that this
takes Eval instead of Eval[].
- Parameters:
operand
- srcRow
- srcCol
-
areSubArraysConsistent
protected static boolean areSubArraysConsistent(double[][] values)
Copyright 2008 The Apache Software Foundation or
its licensors, as applicable.