Class StringOptions
java.lang.Object
eu.svjatoslav.commons.cli_helper.parameter_parser.Option<List<String>,StringOptions>
eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.StringOptions
Represents a command-line option that accepts one or more string parameters.
-
Field Summary
Fields inherited from class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
description, mandatory, parameters
-
Constructor Summary
ConstructorsConstructorDescriptionStringOptions
(String description) Creates a StringOptions object, requiring one or more string parameters. -
Method Summary
Methods inherited from class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
addAliases, addParameter, getAliasesAsString, getHelp, isMandatory, isPresent, matchesAlias, noMoreArguments, setMandatory, setPresent
-
Constructor Details
-
StringOptions
Creates a StringOptions object, requiring one or more string parameters.- Parameters:
description
- a brief description of what these strings represent.
-
-
Method Details
-
describeFormat
Description copied from class:Option
Describes the kind or format of the expected parameter(s), e.g. "File", "Integer", etc.- Specified by:
describeFormat
in classOption<List<String>,
StringOptions> - Returns:
- a short string describing the parameter format
-
getValue
Returns the list of strings provided by the user.- Specified by:
getValue
in classOption<List<String>,
StringOptions> - Returns:
- the parsed value as the generic type T.
-
isValid
Always returns true since any string is valid for this option.- Specified by:
isValid
in classOption<List<String>,
StringOptions> - Parameters:
value
- the parameter string to test- Returns:
true
if valid;false
otherwise
-