Interface TwoStepMapper.Mergeable<T,R>
- All Superinterfaces:
TwoStepMapper<T,R>
- All Known Implementing Classes:
TwoStepMapper.KeyCounter, TwoStepMapper.SimpleCache
- Enclosing interface:
TwoStepMapper<T,R>
Enables merging the results from 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 merge the results from multiple instances.static <T, R, A extends TwoStepMapper.Mergeable<T,R>>
Amerge2(A target, A other) static <T, R, A extends TwoStepMapper.Mergeable<T,R>>
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
-
merge2
-
newCollector
static <T, R, A extends TwoStepMapper.Mergeable<T,R>> Collector<T,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.Mergeableimplementation. -
merge
This method can be used to merge the results from multiple instances. The final results from one instance is merged into another.
-