S
- generator-typeT
- exposed-iterator typeV
- hidden-iterator-typepublic class TransformingGeneratorBridge<S,T,V> extends Object implements TransformingGenerator<T,S>
SingleFileTypeGenerator<V,S>
as if it was an SingleFileTypeGenerator<T,S>
using an function to connect the two.Constructor and Description |
---|
TransformingGeneratorBridge(TransformingGenerator<V,S> delegate,
CheckedFunction<T,V,? extends Throwable> elementBridge) |
Modifier and Type | Method and Description |
---|---|
S |
transform(T element)
Applies any necessary preprocessing to create an element suitable for writing to the
filesystem.
|
void |
write(T element,
OutputNameStyle outputNameStyle,
ElementOutputter outputter)
Writes a non-indexable output (an output that isn't part of a collection of other similar
items).
|
void |
writeWithIndex(T element,
String index,
IndexableOutputNameStyle outputNameStyle,
ElementOutputter outputter)
Writes an indexable output (many outputs of the same type, uniquely identified by an index).
|
public TransformingGeneratorBridge(TransformingGenerator<V,S> delegate, CheckedFunction<T,V,? extends Throwable> elementBridge)
public S transform(T element) throws OutputWriteFailedException
TransformingGenerator
transform
in interface TransformingGenerator<T,S>
element
- element to be assigned and then transformedOutputWriteFailedException
- if anything goes wrongpublic void write(T element, OutputNameStyle outputNameStyle, ElementOutputter outputter) throws OutputWriteFailedException
ElementWriter
write
in interface ElementWriter<T>
element
- the element to write.outputNameStyle
- TODOOutputWriteFailedException
public void writeWithIndex(T element, String index, IndexableOutputNameStyle outputNameStyle, ElementOutputter outputter) throws OutputWriteFailedException
ElementWriter
writeWithIndex
in interface ElementWriter<T>
element
- the element to write.index
- TODOOutputWriteFailedException
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.