Package org.ojalgo.netio
Class MappedWriter<IN,OUT>
- 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>
myMapper
private 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 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.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:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceToFileWriter<IN>
- Throws:
java.io.IOException
-
write
public void write(IN item)
Description copied from interface:ToFileWriter
Write the item to the consumer.- Specified by:
write
in interfaceToFileWriter<IN>
- Parameters:
item
- The item to be written
-
-