Interface Aggregator<T>

All Known Implementing Classes:
Aggregators.BooleanMajority, Aggregators.Collect, Aggregators.Concatenate, Aggregators.ConcatenateUnique, Aggregators.Count, Aggregators.DateMax, Aggregators.DateMean, Aggregators.DateMedian, Aggregators.DateMin, Aggregators.DoubleMax, Aggregators.DoubleMean, Aggregators.DoubleMedian, Aggregators.DoubleMin, Aggregators.DoubleSum, Aggregators.IntMax, Aggregators.IntMean, Aggregators.IntMedian, Aggregators.IntMin, Aggregators.IntSum, Aggregators.LongMax, Aggregators.LongMean, Aggregators.LongMedian, Aggregators.LongMin, Aggregators.LongSum, Aggregators.StringMajority, Aggregators.StringMax, Aggregators.StringMin, Aggregators.Union

public interface Aggregator<T>
An aggregator accumulate individual values with addValue method and return a synthetic value with getResult method.
  • Field Details

  • Method Details

    • clone

      Aggregator<?> clone()
      Create a new Aggregator with the same attributes as this one.
    • ignoreNull

      boolean ignoreNull()
      Returns true if this aggregator must ignore null values.
    • setIgnoreNull

      void setIgnoreNull(boolean ignoreNull)
      Change the way this aggregator process null values.
    • getParameters

      Set<String> getParameters()
      Return parameter names used by this aggregator
      Returns:
      the set of parameters
    • setParameter

      void setParameter(String name, Object value)
      Set a parameter value for this aggregator.
      Parameters:
      name - the name of the aggregator
      value - the new value of the parameter
    • getParameter

      Object getParameter(String name)
      Returns parameter value for name parameter.
      Parameters:
      name - the name of the parameter
    • getName

      String getName()
      Returns the name of this Aggregator.
    • getOutputAttributeType

      AttributeType getOutputAttributeType()
      Returns:
      the AttributeType of the aggregated value.
    • addValue

      void addValue(T value)
      Adds a new value to the aggregator.
      Parameters:
      value - value to be added
    • getValues

      List<T> getValues()
      Returns:
      the values accumulated by this aggregator.
    • getResult

      Object getResult()
      Returns:
      the aggregated value.
    • reset

      void reset()
      Reset the aggregator (clear the list of values)