Interface AggregateOperation3<T0,​T1,​T2,​A,​R>

Type Parameters:
T0 - the type of item in stream-0
T1 - the type of item in stream-1
T2 - the type of item in stream-2
A - the type of the accumulator
R - the type of the aggregation result
All Superinterfaces:
AggregateOperation<A,​R>, Serializable

public interface AggregateOperation3<T0,​T1,​T2,​A,​R>
extends AggregateOperation<A,​R>
Specialization of AggregateOperation (refer to its extensive documentation) to the "arity-3" case with three data streams being aggregated over. AggregateOperations contains factories for the built-in implementations and you can create your own using the aggregate operation builder.

This example constructs an operation that sums up long values from three streams:


 AggregateOperation3<Long, Long, Long, LongAccumulator, Long> aggrOp = AggregateOperation
     .withCreate(LongAccumulator::new)
     .<Long>andAccumulate0(LongAccumulator::add)
     .<Long>andAccumulate1(LongAccumulator::add)
     .<Long>andAccumulate2(LongAccumulator::add)
     .andFinish(LongAccumulator::get);
 
Since:
3.0