Package org.ojalgo.type.function
Class ShardedConsumer.GeneralShardedConsumer<T>
- java.lang.Object
-
- org.ojalgo.type.function.ShardedConsumer<T>
-
- org.ojalgo.type.function.ShardedConsumer.GeneralShardedConsumer<T>
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.util.function.Consumer<T>
,AutoConsumer<T>
,AutoFunctional
- Enclosing class:
- ShardedConsumer<T>
static final class ShardedConsumer.GeneralShardedConsumer<T> extends ShardedConsumer<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ojalgo.type.function.ShardedConsumer
ShardedConsumer.GeneralShardedConsumer<T>, ShardedConsumer.PowerOf2ShardedConsumer<T>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Consumer<T>[]
myConsumers
private java.util.function.ToIntFunction<T>
myDistributor
private int
myNumberOfShards
-
Fields inherited from interface org.ojalgo.type.function.AutoConsumer
NULL
-
-
Constructor Summary
Constructors Constructor Description GeneralShardedConsumer(java.util.function.ToIntFunction<T> distributor, java.util.function.Consumer<T>[] consumers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(T item)
Write the item to the consumer.-
Methods inherited from class org.ojalgo.type.function.ShardedConsumer
close, of
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ojalgo.type.function.AutoConsumer
accept, writeBatch
-
-
-
-
Method Detail
-
write
public void write(T item)
Description copied from interface:AutoConsumer
Write the item to the consumer.- Parameters:
item
- The item to be written
-
-