Class StringOption
java.lang.Object
eu.svjatoslav.commons.cli_helper.parameter_parser.Option<String,StringOption>
eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.StringOption
This class represents commandline option which accepts exactly one parameter
which is a string.
-
Field Summary
Fields inherited from class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
description, mandatory, parameters
-
Constructor Summary
ConstructorDescriptionStringOption
(String description) StringOption
(String description, String defaultValue) -
Method Summary
Methods inherited from class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
addAliases, addParameter, getAliasesAsString, getHelp, isMandatory, isPresent, matchesAlias, noMoreArguments, setMandatory, setPresent
-
Field Details
-
defaultValue
-
-
Constructor Details
-
StringOption
-
StringOption
-
-
Method Details
-
describeFormat
- Specified by:
describeFormat
in classOption<String,
StringOption> - 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<String,
StringOption> - Returns:
- the value of the object.
-
isValid
- Specified by:
isValid
in classOption<String,
StringOption> - Parameters:
value
- value to validate- Returns:
true
if value is correct,false
otherwise.
-