com.tibbo.aggregate.common.expression.function

## Class AbstractSingleValueCollectorFunction

- java.lang.Object
- - com.tibbo.aggregate.common.expression.function.AbstractFunction
  - - com.tibbo.aggregate.common.expression.function.AbstractSingleValueCollectorFunction

- All Implemented Interfaces:
    Function
  Direct Known Subclasses:
    AverageFunction, MaxFunction, MedianFunction, MinFunction, ModeFunction, StandardDeviationFunction, StandardErrorMeanFunction, SumFunction, VarianceFunction

      public abstract class AbstractSingleValueCollectorFunction
      extends AbstractFunction

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic` | `collector`

    - ### Fields inherited from interface com.tibbo.aggregate.common.expression.Function

      `ABSOLUTE, EXPRESSION_EDITOR_OPTIONS, GROUP_COLOR_PROCESSING, GROUP_CONTEXT_RELATED, GROUP_DATA_BLOCK_PROCESSING, GROUP_DATA_TABLE_PROCESSING, GROUP_DATE_TIME_PROCESSING, GROUP_MATH, GROUP_NUMBER_PROCESSING, GROUP_OTHER, GROUP_STRING_PROCESSING, GROUP_SYSTEM, GROUP_TYPE_CONVERSION, HAS_RESOLVER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractSingleValueCollectorFunction(org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic collector, java.lang.String name, java.lang.String category, java.lang.String parametersFootprint, java.lang.String returnValue, java.lang.String description)` Note: If `collector` is null, developer should override `collect(DataTable table, FieldFormat ff)`, otherwise current implementation will throw `EvaluationException`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.Object` | `collect(DataTable table, FieldFormat ff)`
    `protected java.lang.Object` | `compare(java.lang.Number first, java.lang.Number second)`
    `java.lang.Object` | `execute(Evaluator evaluator, EvaluationEnvironment environment, java.lang.Object... parameters)`
    `protected double[]` | `toArray(DataTable table, FieldFormat ff)`

    - ### Methods inherited from class com.tibbo.aggregate.common.expression.function.AbstractFunction

      `checkAndGetNumericTypeField, checkNumericTypeField, checkParameters, checkParameterType, executeAttributed, executeTasks, getCategory, getDescription, getName, getParametersFootprint, getReturnValue, resolveContext, resolveContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### collector

          protected final org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic collector

  - ### Constructor Detail

    - #### AbstractSingleValueCollectorFunction

          public AbstractSingleValueCollectorFunction(@Nullable
                                                      org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic collector,
                                                      java.lang.String name,
                                                      java.lang.String category,
                                                      java.lang.String parametersFootprint,
                                                      java.lang.String returnValue,
                                                      java.lang.String description)

      Note: If `collector` is null, developer should override `collect(DataTable table, FieldFormat ff)`, otherwise current implementation will throw `EvaluationException`.
      See Also:
        `ModeFunction`

  - ### Method Detail

    - #### compare

          protected java.lang.Object compare(java.lang.Number first,
                                             java.lang.Number second)

    - #### execute

          public java.lang.Object execute(Evaluator evaluator,
                                          EvaluationEnvironment environment,
                                          java.lang.Object... parameters)
                                   throws EvaluationException

      Throws:
        `EvaluationException`

    - #### collect

          protected java.lang.Object collect(DataTable table,
                                             FieldFormat ff)
                                      throws EvaluationException

      Throws:
        `EvaluationException`

    - #### toArray

          protected double[] toArray(DataTable table,
                                     FieldFormat ff)