Interface Aggregate<T,A>


public interface Aggregate<T,A>
Accumulates records using arithmetic summation.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accumulate(A accumulator, T record)
    Performs the following operation: accumulator = accumulator + record.
    Creates an object which holds arithmetic sum of accumulated records.
  • Method Details

    • createAccumulator

      A createAccumulator(T record)
      Creates an object which holds arithmetic sum of accumulated records.
      Parameters:
      record - record whose fields are to be accumulated
      Returns:
      accumulator object
    • accumulate

      void accumulate(A accumulator, T record)
      Performs the following operation: accumulator = accumulator + record.
      Parameters:
      accumulator - accumulator which holds the current sum of records
      record - record to add to the accumulator