choice
Convert the argument based on a fixed set of values.
If ignoreCase is true
, the argument will accept values as any mix of upper and lower case.
Example:
argument().choice(mapOf("foo" to 1, "bar" to 2))
Convert the argument based on a fixed set of values.
If ignoreCase is true
, the argument will accept values as any mix of upper and lower case.
Example:
argument().choice("foo" to 1, "bar" to 2)
Restrict the argument to a fixed set of values.
If ignoreCase is true
, the argument will accept values as any mix of upper and lower case. The argument's final value will always match the case of the corresponding value in choices.
Example:
argument().choice("foo", "bar")
Convert the option based on a fixed set of values.
If ignoreCase is true
, the option will accept values as any mix of upper and lower case.
Example:
option().choice(mapOf("foo" to 1, "bar" to 2))
See also
Convert the option based on a fixed set of values.
If ignoreCase is true
, the option will accept values as any mix of upper and lower case.
Example:
option().choice("foo" to 1, "bar" to 2)
See also
Restrict the option to a fixed set of values.
If ignoreCase is true
, the option will accept values as any mix of upper and lower case. The option's final value will always match the case of the corresponding value in choices.
Example:
option().choice("foo", "bar")