Class AverageIf

  • All Implemented Interfaces:
    FreeRefFunction

    public class AverageIf
    extends Object
    Handler for singular AverageIf which has different operand handling than the generic AverageIfs version.
    • Constructor Detail

      • AverageIf

        public AverageIf()
    • Method Detail

      • evaluate

        public ValueEval evaluate​(ValueEval[] args,
                                  OperationEvaluationContext ec)
        Specified by:
        evaluate in interface FreeRefFunction
        Parameters:
        args - the pre-evaluated arguments for this function. args is never null, nor are any of its elements.
        ec - primarily used to identify the source cell containing the formula being evaluated. may also be used to dynamically create reference evals.
        Returns:
        never null. Possibly an instance of ErrorEval in the case of a specified Excel error (Exceptions are never thrown to represent Excel errors).
      • hasInitialRange

        protected boolean hasInitialRange()
        Implementations must be stateless.
        Returns:
        true if there should be a range argument before the criteria pairs
      • createAggregator

        protected org.apache.poi.ss.formula.functions.Baseifs.Aggregator createAggregator()