org.apache.poi.hssf.record.formula.functions
Class XYNumericFunction

java.lang.Object
  extended by org.apache.poi.hssf.record.formula.functions.NumericFunction
      extended by org.apache.poi.hssf.record.formula.functions.XYNumericFunction
All Implemented Interfaces:
Function
Direct Known Subclasses:
Sumx2my2, Sumx2py2, Sumxmy2

public abstract class XYNumericFunction
extends NumericFunction

Author:
Amol S. Deshmukh < amolweb at ya hoo dot com >

Field Summary
protected static int X
           
protected static int Y
           
 
Fields inherited from class org.apache.poi.hssf.record.formula.functions.NumericFunction
E, PI
 
Constructor Summary
XYNumericFunction()
           
 
Method Summary
protected static double[] ensureCapacity(double[] arr, int pos)
           
protected static double getDoubleValue(Eval eval)
           
protected  int getMaxNumOperands()
           
protected  double[][] getNumberArray(Eval[] xops, Eval[] yops, int srcRow, short srcCol)
          Returns a double array that contains values for the numeric cells from among the list of operands.
protected  double[][] getValues(Eval[] operands, int srcCellRow, short srcCellCol)
           
protected  ValueEvalToNumericXlator getXlator()
          this is the default impl for the factory method getXlator of the super class NumericFunction.
protected static boolean isNumberEval(Eval eval)
           
protected static double[] trimToSize(double[] arr, int len)
           
 
Methods inherited from class org.apache.poi.hssf.record.formula.functions.NumericFunction
singleOperandEvaluate
 
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
 

Field Detail

X

protected static final int X
See Also:
Constant Field Values

Y

protected static final int Y
See Also:
Constant Field Values
Constructor Detail

XYNumericFunction

public XYNumericFunction()
Method Detail

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()

getNumberArray

protected double[][] getNumberArray(Eval[] xops,
                                    Eval[] yops,
                                    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:
xops -
yops -
srcRow -
srcCol -

getValues

protected double[][] getValues(Eval[] operands,
                               int srcCellRow,
                               short srcCellCol)

ensureCapacity

protected static double[] ensureCapacity(double[] arr,
                                         int pos)

trimToSize

protected static double[] trimToSize(double[] arr,
                                     int len)

isNumberEval

protected static boolean isNumberEval(Eval eval)

getDoubleValue

protected static double getDoubleValue(Eval eval)


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.