multipleSet

fun <EachT, ValueT> NullableOption<EachT, ValueT>.multipleSet(default: Set<EachT> = emptySet(), required: Boolean = false): OptionWithValues<Set<EachT>, EachT, ValueT>(source)

Make the option return a set of calls; each item in the set is the value of one call.

If the option is never called, the set will be empty. This must be applied after all other transforms.

Example:

val opt: Set<Pair<Int, Int>> by option().int().pair().multipleSet()

Parameters

default

The value to use if the option is not supplied. Defaults to an empty set.

required

If true, default is ignored and MissingOption will be thrown if no instances of the option are present on the command line.