Class OutputterTarget
Object
org.anchoranalysis.io.output.outputter.directory.OutputterTarget
public final class OutputterTarget extends Object
The directory and prefix an outputter writes to.
This class is immutable.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description OutputterTarget(DirectoryWithPrefix directory, DirectoryCreationParameters parameters)Creates for a particular directory, with optionally an associated prefix. -
Method Summary
Modifier and Type Method Description OutputterTargetchangePrefix(DirectoryWithPrefix prefixToAssign)Creates a newOutputterTargetwith a changed prefix.booleanequals(Object o)PathgetDirectory()The directory into which outputting occurs.Optional<WriterExecuteBeforeEveryOperation>getParentDirectoryCreator()Parent directory creator to be executed before any derived sub-directories.DirectoryWithPrefixgetPrefix()The directory and prefix into which outputting occurs.inthashCode()PathCreatorpathCreator()Creates the path into which output is written.StringtoString()
-
Constructor Details
-
OutputterTarget
public OutputterTarget(DirectoryWithPrefix directory, DirectoryCreationParameters parameters) throws BindFailedExceptionCreates for a particular directory, with optionally an associated prefix.- Parameters:
directory- the directory to output, with optionally an associated prefix.parameters- parameters that influence how the directory is created.- Throws:
BindFailedException- if the directory cannot be successfully used as an output target.
-
-
Method Details
-
changePrefix
Creates a newOutputterTargetwith a changed prefix.The directory-component of the prefix must be equal to or a subdirectory of the existing
directory.- Parameters:
prefixToAssign- the prefix to assign- Returns:
- a new shallow-copied
OutputterTargetbut instead withprefixToAssign. - Throws:
BindFailedException- if the subdirectory cannot be outputted to
-
getParentDirectoryCreator
Parent directory creator to be executed before any derived sub-directories.- Returns:
- an operation writer, if it exists.
-
getDirectory
The directory into which outputting occurs.- Returns:
- a path to the directory.
-
pathCreator
Creates the path into which output is written.- Returns:
- an instance can determine the direction into which output is written.
-
equals
-
hashCode
public int hashCode() -
toString
-
getPrefix
The directory and prefix into which outputting occurs.
-