-
- All Superinterfaces:
TwoStepMapper<T,R>
- All Known Implementing Classes:
TwoStepMapper.KeyCounter,TwoStepMapper.SimpleCache
- Enclosing interface:
- TwoStepMapper<T,R>
public static interface TwoStepMapper.Mergeable<T,R> extends 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
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidmerge(R other)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>>
java.util.stream.Collector<T,A,R>newCollector(java.util.function.Supplier<A> supplier)Create a newCollectorthat can be used withStream.collect(Collector).-
Methods inherited from interface org.ojalgo.type.function.TwoStepMapper
consume, getResults, reset
-
-
-
-
Method Detail
-
merge2
static <T,R,A extends TwoStepMapper.Mergeable<T,R>> A merge2(A target, A other)
-
newCollector
static <T,R,A extends TwoStepMapper.Mergeable<T,R>> java.util.stream.Collector<T,A,R> newCollector(java.util.function.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
void merge(R other)
This method can be used to merge the results from multiple instances. The final results from one instance is merged into another.
-
-