classorg.draftcode.argot
OptionSpec
A named parameter that takes a value, for example --count 3, --count=3, or -c 3.
Constructors
OptionSpec
OptionSpec(names: List<String>, converter: Converter<*>, help: String, required: Boolean, default: Any?, multiple: Boolean)
- names
the option's names, primary first, for example
["--count", "-c"].- converter
converts each raw value to the typed result.
- help
help text for
--help.- required
whether at least one occurrence must be supplied.
- default
the already-converted value used when a single-valued option is absent.
- multiple
when true repeats accumulate into a list; when false a second occurrence is an
ArgotParseException.DuplicateValue.
Properties
primaryName
val primaryName: String
The first of names, used as the lookup key in ParsedValues.