Package org.flasby.cli
Class Options
java.lang.Object
org.flasby.cli.Options
- Author:
- flasbyst
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd a new Option to this option collection.addOption
(OptionList option) create an option which is not mandatory and has no defailt value.create a new option with control over if the option must be specified.create an option which is optional and has a default value.createFlag
(char flag, String descriptionKey) createList
(char option, String descriptionKey) create a new option list.createList
(char option, String descriptionKey, boolean isMandatory) returns a new MLS key with the qualifier appended to the prefix defined for this instance.Option[]
returns the options set on this collection of options.toString()
usage()
returns a string suitable for showing to the user as a usage description.
-
Constructor Details
-
Options
-
Options
-
-
Method Details
-
getMlsKey
returns a new MLS key with the qualifier appended to the prefix defined for this instance. This is useful to quickly obtain NLS keys which are specific to this Options instance.- Parameters:
qualifier
-- Returns:
-
addOption
add a new Option to this option collection.- Returns:
- the option to allow for command chaining.
-
addOption
-
addOption
-
getOptions
returns the options set on this collection of options.- Returns:
-
usage
returns a string suitable for showing to the user as a usage description.- Returns:
- the usage string.
-
create
create an option which is not mandatory and has no defailt value.- Parameters:
option
-descriptionKey
-- Returns:
-
create
create an option which is optional and has a default value.- Parameters:
option
-descriptionKey
-defaultValue
-- Returns:
-
create
create a new option with control over if the option must be specified. This only makes sense if te option is mandatory as you can create option ones usig other methods.- Parameters:
option
-descriptionKey
-isMandatory
-- Returns:
-
createList
create a new option list. Option lists are used where an option can have multiple values.- Parameters:
option
-descriptionKey
-- Returns:
-
createList
-
create
-
create
-
create
-
create
-
createFlag
-
getMessageBundle
-
toString
-