public final class FileNamerContext extends Object
Constructor and Description |
---|
FileNamerContext(Logger logger)
Creates with a logger, and otherwise uses sensible defaults.
|
FileNamerContext(Optional<Path> inputDirectory,
boolean relativeToDirectory,
Optional<IndexRangeNegative> nameSubrange,
Logger logger)
Creates with specific parameters.
|
FileNamerContext(Optional<Path> inputDirectory,
boolean relativeToDirectory,
String elseName,
Optional<IndexRangeNegative> nameSubrange,
Logger logger) |
FileNamerContext(String elseName,
Logger logger)
Creates with a fallback-name and a logger, but otherwise using sensible defaults.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getElseName()
A fallback name, if a failure occurs when naming.
|
Optional<Path> |
getInputDirectory()
A directory associated with the inputs, which if defined, is guaranteed to be a parent of
them all.
|
Logger |
getLogger()
Logs information messages.
|
Optional<IndexRangeNegative> |
getNameSubrange()
If defined, this indicates and specifies only a subset of the naming-elements to use.
|
int |
hashCode() |
boolean |
isRelativeToDirectory()
If true, the namer should prefer to derive file-names relative to the directory, rather than
only the varying elements in the file-names.
|
String |
toString() |
public FileNamerContext(Logger logger)
logger
- the logger.public FileNamerContext(Optional<Path> inputDirectory, boolean relativeToDirectory, Optional<IndexRangeNegative> nameSubrange, Logger logger)
inputDirectory
- a directory associated with the inputs, which if defined, is guaranteed
to be a parent of them all.relativeToDirectory
- if true, the namer should prefer to derive file-names relative to
the directory, rather than only the varying elements in the file-names.nameSubrange
- if defined, this indicates and specifies only a subset of the
naming-elements to use.logger
- the logger.public FileNamerContext(String elseName, Logger logger)
elseName
- a fallback-name, if a failure occurs when naming.logger
- the logger.public Optional<Path> getInputDirectory()
public boolean isRelativeToDirectory()
public String getElseName()
public Optional<IndexRangeNegative> getNameSubrange()
public Logger getLogger()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.