Package org.ojalgo.type.function
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 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 void
combine(A other)
This 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>>
java.util.stream.Collector<T,A,R>newCollector(java.util.function.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 Detail
-
combine2
static <T,R,A extends TwoStepMapper.Combineable<T,R,A>> A combine2(A target, A other)
-
newCollector
static <T,R,A extends TwoStepMapper.Combineable<T,R,A>> java.util.stream.Collector<T,A,R> newCollector(java.util.function.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.Combineable
implementation.
-
combine
void combine(A other)
This method can be used to combine the state of multiple instances. The intermediate/internal state from one instance is combined into another.
-
-