Interface AggregatorInstance<T>

  • Type Parameters:
    T - the runtime type of aggregation result
    All Known Implementing Classes:
    Average, Count, Max, Min, Sum

    public interface AggregatorInstance<T>
    An AggregatorInstance takes input objects and computes an aggregate function from them.
    Author:
    Greg Luck
    • Method Detail

      • accept

        void accept​(java.lang.Object input)
             throws AggregatorException
        Add the given value to the aggregator function
        Parameters:
        input - a single input value
        Throws:
        AggregatorException - if the function cannot be computed, possibly due to unsupported types
      • aggregateResult

        java.lang.Object aggregateResult()
        Retrieve the final result
        Returns:
        aggregate result
      • getAttribute

        Attribute<?> getAttribute()
        Get the attribute to pass to aggregator
        Returns:
        attribute to aggregate (null if no attribute is applicable to function)
      • createClone

        AggregatorInstance<T> createClone()
        Create a clone of this aggregator, detaching from its result
        Returns: