groupSwitch

fun <T : OptionGroup> RawOption.groupSwitch(choices: Map<String, T>): ChoiceGroup<T, T?>

Convert the option into a set of flags that each map to an option group.

Example:

option().groupSwitch(mapOf("--foo" to FooOptionGroup(), "--bar" to BarOptionGroup()))
fun <T : OptionGroup> RawOption.groupSwitch(vararg choices: Pair<String, T>): ChoiceGroup<T, T?>

Convert the option into a set of flags that each map to an option group.

Example:

option().groupSwitch("--foo" to FooOptionGroup(), "--bar" to BarOptionGroup())