Package org.ojalgo.type.function
Class MappedConsumer<IN,OUT>
- java.lang.Object
-
- org.ojalgo.type.function.MappedConsumer<IN,OUT>
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.util.function.Consumer<IN>
,AutoConsumer<IN>
,AutoFunctional
final class MappedConsumer<IN,OUT> extends java.lang.Object implements AutoConsumer<IN>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Consumer<OUT>
myConsumer
private java.util.function.Function<IN,OUT>
myMapper
-
Fields inherited from interface org.ojalgo.type.function.AutoConsumer
NULL
-
-
Constructor Summary
Constructors Constructor Description MappedConsumer(java.util.function.Function<IN,OUT> mapper, java.util.function.Consumer<OUT> consumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
write(IN item)
Write the item to the consumer.-
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
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceAutoConsumer<IN>
- Throws:
java.lang.Exception
-
write
public void write(IN item)
Description copied from interface:AutoConsumer
Write the item to the consumer.- Specified by:
write
in interfaceAutoConsumer<IN>
- Parameters:
item
- The item to be written
-
-