public class MultiLineOutputWriter extends LineOutputWriter<MultiCollectable<?>>
OutputWriter
implementation writing several lines from a
MultiCollectable
to one file.EMPTY
Constructor and Description |
---|
MultiLineOutputWriter(MultiCollectable<?> collectable,
Path outputPath) |
Modifier and Type | Method and Description |
---|---|
protected T |
getCollectable()
Returns the
Collectable containing the data to be written. |
String |
getFileName()
Returns the name of the file where data is to be written.
|
String |
toString() |
protected void |
writeHeaders(de.zmt.output.writing.CsvWriter writer)
Write headers from collectable using the writer.
|
void |
writeValues(long steps)
Implementing classes need to specify how to write values.
|
close, getWriter, setOutputPath
public MultiLineOutputWriter(MultiCollectable<?> collectable, Path outputPath)
public void writeValues(long steps) throws IOException
OutputWriter
writeValues
in interface OutputWriter
writeValues
in class LineOutputWriter<MultiCollectable<?>>
steps
- the number of steps passed in Schedule
IOException
- If an I/O error occursprotected final void writeHeaders(de.zmt.output.writing.CsvWriter writer)
writer
- the writer to write the headersprotected T getCollectable()
Collectable
containing the data to be written.Collectable
containing the data to be writtenpublic String getFileName()