Class DirectoryCreationParameters
Object
org.anchoranalysis.io.output.outputter.DirectoryCreationParameters
public final class DirectoryCreationParameters extends Object
Options that influence how an output directory is created.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description DirectoryCreationParameters()Creates to not delete directories, and with no consumer called upon directory creation.DirectoryCreationParameters(boolean deleteExistingDirectory, Optional<Consumer<Path>> callUponDirectoryCreation) -
Method Summary
Modifier and Type Method Description booleanequals(Object o)Optional<Consumer<Path>>getCallUponDirectoryCreation()When defined, thisconsumeris called when the directory is first created, as it is created lazily only when first needed.inthashCode()booleanisDeleteExistingDirectory()When true, this will delete any existing directory with the same path, and then create it anew.StringtoString()
-
Constructor Details
-
DirectoryCreationParameters
public DirectoryCreationParameters()Creates to not delete directories, and with no consumer called upon directory creation. -
DirectoryCreationParameters
-
-
Method Details
-
isDeleteExistingDirectory
public boolean isDeleteExistingDirectory()When true, this will delete any existing directory with the same path, and then create it anew.When false, an exception is thrown if an existing directory with the same path already exists.
-
getCallUponDirectoryCreation
When defined, thisconsumeris called when the directory is first created, as it is created lazily only when first needed.It is called with the path of the directory as an argument.
-
equals
-
hashCode
public int hashCode() -
toString
-