Interface CombinerAggregator<T,A,R>  
- All Superinterfaces:
- Operation,- Serializable
Interface for aggregating values.
- 
Method SummaryModifier and TypeMethodDescriptionUpdates the accumulator by applying the current accumulator with the value.init()The initial value of the accumulator to start with.Merges two accumulators and returns the merged accumulator.static <T,R> CombinerAggregator<T, R, R> of(R initialValue, BiFunction<? super R, ? super T, ? extends R> accumulator, BiFunction<? super R, ? super R, ? extends R> combiner) A static factory to create aCombinerAggregatorbased on initial value, accumulator and combiner.Produces a result value out of the accumulator.
- 
Method Details- 
ofstatic <T,R> CombinerAggregator<T,R, ofR> (R initialValue, BiFunction<? super R, ? super T, ? extends R> accumulator, BiFunction<? super R, ? super R, ? extends R> combiner) A static factory to create aCombinerAggregatorbased on initial value, accumulator and combiner.- Parameters:
- initialValue- the initial value of the result to start with
- accumulator- a function that accumulates values into a partial result
- combiner- a function that combines partially accumulated results
- Returns:
- the CombinerAggregator
 
- 
initA init()The initial value of the accumulator to start with.- Returns:
- the initial value of the accumulator
 
- 
applyUpdates the accumulator by applying the current accumulator with the value.- Parameters:
- accumulator- the current accumulator
- value- the value
- Returns:
- the updated accumulator
 
- 
mergeMerges two accumulators and returns the merged accumulator.- Parameters:
- accum1- the first accumulator
- accum2- the second accumulator
- Returns:
- the merged accumulator
 
- 
resultProduces a result value out of the accumulator.- Parameters:
- accum- the accumulator
- Returns:
- the result
 
 
-