Class FileOptions
java.lang.Object
eu.svjatoslav.commons.cli_helper.parameter_parser.Option<List<File>,FileOptions>
eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOptions
This class represents commandline option which accepts one or more parameters
which are files.
-
Field Summary
Fields inherited from class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
description, mandatory, parameters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetValue()
Returns the value of the object.boolean
This method is used to define that file shall exist in filesystem.This method is used to define that file shall not exist in filesystem.Methods inherited from class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
addAliases, addParameter, getAliasesAsString, getHelp, isMandatory, isPresent, matchesAlias, noMoreArguments, setMandatory, setPresent
-
Constructor Details
-
FileOptions
-
-
Method Details
-
describeFormat
- Specified by:
describeFormat
in classOption<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
Description copied from class:Option
Returns the value of the object.- Specified by:
getValue
in classOption<List<File>,
FileOptions> - Returns:
- the value of the object.
-
mustExist
This method is used to define that file shall exist in filesystem.- Returns:
- This object.
-
mustNotExist
This method is used to define that file shall not exist in filesystem.- Returns:
- This object.
-
isValid
- Specified by:
isValid
in classOption<List<File>,
FileOptions> - Parameters:
value
- value to validate- Returns:
true
if value is correct,false
otherwise.
-