# Interface Aggregator.Accumulator

Enclosing interface:
  `Aggregator`

public static interface Aggregator.Accumulator
Can accumulate multiple data items of a consistent type and yield an aggregate value corresponding to the set.

Since:
  16 Nov 2022
Author:
  Mark Taylor

## Method Summary

Modifier and Type
Method
Description
`void`
`add(Aggregator.Accumulator other)`
Combines the content of another compatible accumulator with the content of this one.
`Object`
`getResult()`
Returns the aggregated value for the values accumulated so far.
`void`
`submit(Object datum)`
Submits a value for accumulation.

## Method Details

### submit

void submit(Object datum)
Submits a value for accumulation.

Parameters:
  `datum` - value to accumulate

### getResult

Object getResult()
Returns the aggregated value for the values accumulated so far.

Returns:
  accumulated result

### add

void add(Aggregator.Accumulator other)
Combines the content of another compatible accumulator with the content of this one. The effect is as if all the data that have been accumulated into `other` were accumulated additionally into this one.

Parameters:
  `other` - other compatible accumulator