Interface IAggregator<V,C extends IItemConsumer<C>>

Type Parameters:
V - the type of the calculation result
C - An item consumer type. See IItemConsumer about the self referring extends definition. Only really important when implementing this interface. When handling aggregator instances you can usually use ?.
All Superinterfaces:
IDescribable, IItemConsumerFactory<C>
All Known Implementing Classes:
Aggregators.AdvancedMaxAggregator, Aggregators.AdvancedMinAggregator, Aggregators.AggregatorBase, Aggregators.Avg, Aggregators.FieldAggregatorBase, Aggregators.MergingAggregator, Aggregators.MinMax, Aggregators.Stddev, Aggregators.Sum, Aggregators.Variance

public interface IAggregator<V,C extends IItemConsumer<C>> extends IItemConsumerFactory<C>, IDescribable
Encapsulates the calculation of an aggregate for (potentially) different types of items. Basically this is a combination of IItemConsumerFactory that creates IItemConsumers which consumes input items and calculates intermediate values, IValueBuilder which maps from the IItemConsumer intermediate values to the output value, and IDescribable which provides human readable descriptions about the output value.
  • Method Details

    • getValueType

      IType<? super V> getValueType()
      Returns:
      The type for the value
    • getValue

      V getValue(Iterator<C> source)
      Parameters:
      source - the source to build the value from
      Returns:
      the constructed value