Top Description Fields Constructors Methods
org.apache.poi.ss.formula.atp

pack-priv final Class ParityFunction

extends Object
implements FreeRefFunction
Class Inheritance
All Implemented Interfaces
org.apache.poi.ss.formula.functions.FreeRefFunction
Imports
org.apache.poi.ss.formula.eval.BoolEval, .ErrorEval, .EvaluationException, .OperandResolver, .ValueEval, org.apache.poi.ss.formula.functions.FreeRefFunction, org.apache.poi.ss.formula.OperationEvaluationContext

Implementation of Excel 'Analysis ToolPak' function ISEVEN() ISODD()

Field Summary

Modifier and TypeField and Description
private final int
public static final FreeRefFunction
public static final FreeRefFunction

Constructor Summary

AccessConstructor and Description
private
ParityFunction(int desiredParity)

Method Summary

Modifier and TypeMethod and Description
public ValueEval
evaluate(ValueEval[]
the pre-evaluated arguments for this function. args is never null, nor are any of its elements.
args
,
OperationEvaluationContext
primarily used to identify the source cell containing the formula being evaluated. may also be used to dynamically create reference evals.
ec
)

Implements org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

private static int
evaluateArgParity(ValueEval arg, int srcCellRow, int srcCellCol)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_desiredParityback to summary
private final int _desiredParity
IS_EVENback to summary
public static final FreeRefFunction IS_EVEN
IS_ODDback to summary
public static final FreeRefFunction IS_ODD

Constructor Detail

ParityFunctionback to summary
private ParityFunction(int desiredParity)

Method Detail

evaluateback to summary
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec)

Implements org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

Parameters
args:ValueEval[]

Doc from org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

the pre-evaluated arguments for this function. args is never null, nor are any of its elements.

ec:OperationEvaluationContext

Doc from org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

primarily used to identify the source cell containing the formula being evaluated. may also be used to dynamically create reference evals.

Returns:ValueEval

Doc from org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

never null. Possibly an instance of ErrorEval in the case of a specified Excel error (Exceptions are never thrown to represent Excel errors).

evaluateArgParityback to summary
private static int evaluateArgParity(ValueEval arg, int srcCellRow, int srcCellCol) throws EvaluationException