Interface ElementWriter<T>
- Type Parameters:
T- the type of element to be written
public interface ElementWriter<T>
Writes an element (with or without an index) to the file system.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(T element, OutputNameStyle outputNameStyle, ElementOutputter outputter) Writes a non-indexable output (an output that isn't part of a collection of other similar items).voidwriteWithIndex(T element, String index, IndexableOutputNameStyle outputNameStyle, ElementOutputter outputter) Writes an indexable output (many outputs of the same type, uniquely identified by an index).
-
Method Details
-
write
void write(T element, OutputNameStyle outputNameStyle, ElementOutputter outputter) throws OutputWriteFailedException Writes a non-indexable output (an output that isn't part of a collection of other similar items).- Parameters:
element- the element to write.outputNameStyle- how to write output-names.outputter- how the element is outputted.- Throws:
OutputWriteFailedException- if the write operation fails.
-
writeWithIndex
void writeWithIndex(T element, String index, IndexableOutputNameStyle outputNameStyle, ElementOutputter outputter) throws OutputWriteFailedException Writes an indexable output (many outputs of the same type, uniquely identified by an index).- Parameters:
element- the element to write.index- a string that uniquely identifies this element compared to others in the same write operation.outputNameStyle- how to write output-names.outputter- how the element is outputted.- Throws:
OutputWriteFailedException- if the write operation fails.
-