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

public Class AverageIf

extends Baseifs
Class Inheritance
Imports
org.apache.poi.ss.formula.OperationEvaluationContext, org.apache.poi.ss.formula.eval.AreaEval, .ErrorEval, .EvaluationException, .NumberEval, .ValueEval, org.apache.poi.ss.formula.functions.CountUtils.I_MatchPredicate

Handler for singular AverageIf which has different operand handling than the generic AverageIfs version.

Field Summary

Modifier and TypeField and Description
public static final FreeRefFunction

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected ValueEval
protected Baseifs.Aggregator
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
)

Overrides org.apache.poi.ss.formula.functions.Baseifs.evaluate.

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

protected boolean
hasInitialRange()

Implements abstract org.apache.poi.ss.formula.functions.Baseifs.hasInitialRange.

Implementations must be stateless.

Inherited from org.apache.poi.ss.formula.functions.Baseifs:
convertRangeArg

Field Detail

instanceback to summary
public static final FreeRefFunction instance

Constructor Detail

AverageIfback to summary
public AverageIf()

Method Detail

aggregateMatchingCellsback to summary
protected ValueEval aggregateMatchingCells(Baseifs.Aggregator aggregator, AreaEval sumRange, AreaEval testRange, CountUtils.I_MatchPredicate mp) throws EvaluationException
createAggregatorback to summary
protected Baseifs.Aggregator createAggregator()

Implements abstract org.apache.poi.ss.formula.functions.Baseifs.createAggregator.

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

Overrides org.apache.poi.ss.formula.functions.Baseifs.evaluate.

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

Annotations
@Override
hasInitialRangeback to summary
protected boolean hasInitialRange()

Implements abstract org.apache.poi.ss.formula.functions.Baseifs.hasInitialRange.

Doc from org.apache.poi.ss.formula.functions.Baseifs.hasInitialRange.

Implementations must be stateless.

Returns:boolean

true if there should be a range argument before the criteria pairs

Annotations
@Override