FileDocCategorySizeDatePackage
FinanceFunction.javaAPI DocApache Poi 3.0.13277Sun Mar 11 12:59:30 GMT 2007org.apache.poi.hssf.record.formula.functions

FinanceFunction

public abstract class FinanceFunction extends NumericFunction
author
Amol S. Deshmukh < amolweb at ya hoo dot com > Super class for all Evals for financial function evaluation.

Fields Summary
private static final org.apache.poi.hssf.record.formula.eval.ValueEvalToNumericXlator
DEFAULT_NUM_XLATOR
Constructors Summary
Methods Summary
protected org.apache.poi.hssf.record.formula.eval.ValueEvalToNumericXlatorgetXlator()
this is the default impl of the factory(ish) method getXlator. Subclasses can override this method if they desire to return a different ValueEvalToNumericXlator instance than the default.

    
                                    
       
        return DEFAULT_NUM_XLATOR;
    
protected org.apache.poi.hssf.record.formula.eval.ValueEvalsingleOperandNumericAsBoolean(org.apache.poi.hssf.record.formula.eval.Eval eval, int srcRow, short srcCol)

        ValueEval retval = null;
        retval = singleOperandEvaluate(eval, srcRow, srcCol);
        if (retval instanceof NumericValueEval) {
            NumericValueEval nve = (NumericValueEval) retval;
            retval = (nve.getNumberValue() == 0)
                    ? BoolEval.FALSE
                    : BoolEval.TRUE;
        }
        else {
            retval = ErrorEval.VALUE_INVALID;
        }
        return retval;