Class OutputSequenceStackFactory
Object
OutputSequenceStackFactory
Creates output-sequences of different kinds for writing stacks to a directory.
- Author:
- Owen Feehan
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OutputSequenceStackFactoryA factory with no restrictions on what kind of stacks can be outputted. -
Method Summary
Modifier and TypeMethodDescriptionstatic OutputSequenceStackFactoryalways2D()The stacks that are outputted are guaranteed to be two-dimensional.incrementingByOne(String subdirectoryName, OutputterChecked outputter) Creates an sequence of stacks in a subdirectory with a number in the outputted file name that increments each time by one.withoutOrderCurrentDirectory(String outputName, OutputterChecked outputter) Creates a sequence of stacks in the current context's directory that has no pattern.voidwithoutOrderSubset(NamedProvider<Stack> stacks, String outputName, boolean suppressSubdirectory, OutputterChecked outputter) Writes all or a subset from a set of named-stacks to a directory.
-
Field Details
-
NO_RESTRICTIONS
A factory with no restrictions on what kind of stacks can be outputted.
-
-
Method Details
-
always2D
The stacks that are outputted are guaranteed to be two-dimensional.- Returns:
- a newly created factory.
-
incrementingByOne
public OutputSequenceIncrementing<Stack> incrementingByOne(String subdirectoryName, OutputterChecked outputter) throws OutputWriteFailedException Creates an sequence of stacks in a subdirectory with a number in the outputted file name that increments each time by one.- Parameters:
subdirectoryName- the name of the subdirectory in which stacks will be written (relative tocontext.outputter- determines where and how the outputting occurs- Returns:
- the created output-sequence (and started)
- Throws:
OutputWriteFailedException- if any output fails to be successfully written.
-
withoutOrderCurrentDirectory
public OutputSequenceIndexed<Stack,String> withoutOrderCurrentDirectory(String outputName, OutputterChecked outputter) throws OutputWriteFailedException Creates a sequence of stacks in the current context's directory that has no pattern.- Parameters:
outputName- name to use for the directory, for checking if it is allowed, and for the second-level outputs.outputter- determines where and how the outputting occurs- Returns:
- the created output-sequence (and started)
- Throws:
OutputWriteFailedException- if any output fails to be successfully written.
-
withoutOrderSubset
public void withoutOrderSubset(NamedProvider<Stack> stacks, String outputName, boolean suppressSubdirectory, OutputterChecked outputter) throws OutputWriteFailedException Writes all or a subset from a set of named-stacks to a directory.A second-level output manager filters which stacks are written.
- Parameters:
stacks- the stacks to output (or a subset thereof according to the second-level output manager).outputName- name to use for the directory, for checking if it is allowed, and for the second-level outputs.suppressSubdirectory- if true, a separate subdirectory is not created, and rather the outputs occur in the parent directory.outputter- determines where and how the outputting occurs.- Throws:
OutputWriteFailedException- if any output fails to be successfully written.
-