Interface TwoStepMapper.Combineable<T, R, A extends TwoStepMapper.Combineable<T,R,A> >
- All Superinterfaces:
TwoStepMapper<T,R>
- All Known Implementing Classes:
SampleSet.CombineableSet, TwoStepMapper.KeyCounter, TwoStepMapper.SimpleCache
- Enclosing interface:
TwoStepMapper<T,R>
public static interface TwoStepMapper.Combineable<T, R, A extends TwoStepMapper.Combineable<T,R,A>>
extends TwoStepMapper<T,R>
Enables combining the state of multiple instances.
-
Nested Class Summary
Nested classes/interfaces inherited from interface TwoStepMapper
TwoStepMapper.Combineable<T,R, A>, TwoStepMapper.KeyCounter<T, G>, TwoStepMapper.Mergeable<T, R>, TwoStepMapper.SimpleCache<K, V> -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method can be used to combine the state of multiple instances.static <T, R, A extends TwoStepMapper.Combineable<T,R, A>>
Acombine2(A target, A other) static <T, R, A extends TwoStepMapper.Combineable<T,R, A>>
Collector<T, A, R> newCollector(Supplier<A> supplier) Create a newCollectorthat can be used withStream.collect(Collector).Methods inherited from interface TwoStepMapper
consume, getResults, reset
-
Method Details
-
combine2
-
newCollector
static <T, R, A extends TwoStepMapper.Combineable<T,R, Collector<T,A>> A, newCollectorR> (Supplier<A> supplier) Create a newCollectorthat can be used withStream.collect(Collector). Just provide a constructor or factory method reference to create instances of aTwoStepMapper.Combineableimplementation. -
combine
This method can be used to combine the state of multiple instances. The intermediate/internal state from one instance is combined into another.
-