java.lang.Object
eu.svjatoslav.commons.cli_helper.parameter_parser.Option<List<File>,FileOptions>
eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOptions

public class FileOptions extends Option<List<File>,FileOptions>
This class represents commandline option which accepts one or more parameters which are files.
  • Constructor Details

    • FileOptions

      public FileOptions(String description)
  • Method Details

    • describeFormat

      public String describeFormat()
      Specified by:
      describeFormat in class Option<List<File>,FileOptions>
      Returns:
      Single line parameter type description. For example: "file", "date", "integer", "regular expression", etc..

      Note: for argument purpose description there is Option.description

    • getValue

      public List<File> getValue()
      Description copied from class: Option
      Returns the value of the object.
      Specified by:
      getValue in class Option<List<File>,FileOptions>
      Returns:
      the value of the object.
    • mustExist

      public FileOptions mustExist()
      This method is used to define that file shall exist in filesystem.
      Returns:
      This object.
    • mustNotExist

      public FileOptions mustNotExist()
      This method is used to define that file shall not exist in filesystem.
      Returns:
      This object.
    • isValid

      public boolean isValid(String value)
      Specified by:
      isValid in class Option<List<File>,FileOptions>
      Parameters:
      value - value to validate
      Returns:
      true if value is correct, false otherwise.