- java.lang.Object
-
- org.ojalgo.netio.MappedWriter<IN,OUT>
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,ToFileWriter<IN>
final class MappedWriter<IN,OUT> extends java.lang.Object implements ToFileWriter<IN>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ojalgo.netio.ToFileWriter
ToFileWriter.Builder<F>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Function<IN,OUT>myMapperprivate ToFileWriter<OUT>myWriter-
Fields inherited from interface org.ojalgo.netio.ToFileWriter
NULL
-
-
Constructor Summary
Constructors Constructor Description MappedWriter(java.util.function.Function<IN,OUT> mapper, ToFileWriter<OUT> writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidwrite(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.netio.ToFileWriter
writeBatch
-
-
-
-
Field Detail
-
myWriter
private final ToFileWriter<OUT> myWriter
-
-
Constructor Detail
-
MappedWriter
MappedWriter(java.util.function.Function<IN,OUT> mapper, ToFileWriter<OUT> writer)
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceToFileWriter<IN>- Throws:
java.io.IOException
-
write
public void write(IN item)
Description copied from interface:ToFileWriterWrite the item to the consumer.- Specified by:
writein interfaceToFileWriter<IN>- Parameters:
item- The item to be written
-
-