Package org.ojalgo.type.function
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 org.ojalgo.type.function.TwoStepMapper
TwoStepMapper.Combineable<T,
R, A extends TwoStepMapper.Combineable<T, R, A>>, TwoStepMapper.KeyCounter<T, G>, TwoStepMapper.Mergeable<T, R>, TwoStepMapper.SimpleCache<K, V> -
Method Summary
Modifier and TypeMethodDescriptionvoid
This 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 newCollector
that can be used withStream.collect(Collector)
.Methods inherited from interface org.ojalgo.type.function.TwoStepMapper
consume, getResults, reset
-
Method Details
-
merge2
-
newCollector
static <T,R, Collector<T,A extends TwoStepMapper.Mergeable<T, R>> A, newCollectorR> (Supplier<A> supplier) Create a newCollector
that can be used withStream.collect(Collector)
. Just provide a constructor or factory method reference to create instances of aTwoStepMapper.Mergeable
implementation. -
merge
This method can be used to merge the results from multiple instances. The final results from one instance is merged into another.
-