Class FileNamerContext

Object
org.anchoranalysis.io.input.file.FileNamerContext

public final class FileNamerContext
extends Object
Provides useful additional objects when assigning a name to a file.
Author:
Owen Feehan
  • Constructor Details

    • FileNamerContext

      public FileNamerContext​(Logger logger)
      Creates with a logger, and otherwise uses sensible defaults.
      Parameters:
      logger - the logger.
    • FileNamerContext

      public FileNamerContext​(Optional<Path> inputDirectory, boolean relativeToDirectory, Optional<IndexRangeNegative> nameSubrange, Logger logger)
      Creates with specific parameters.
      Parameters:
      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.
    • FileNamerContext

      public FileNamerContext​(String elseName, Logger logger)
      Creates with a fallback-name and a logger, but otherwise using sensible defaults.
      Parameters:
      elseName - a fallback-name, if a failure occurs when naming.
      logger - the logger.
    • FileNamerContext

      public FileNamerContext​(Optional<Path> inputDirectory, boolean relativeToDirectory, String elseName, Optional<IndexRangeNegative> nameSubrange, Logger logger)
  • Method Details