Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
typealias CoOccurringOptionGroupTransform<GroupT, OutT> = (occurred: Boolean?, group: GroupT, context: Context) -> OutT
Link copied to clipboard
open class OptionGroup(name: String? = null, help: String? = null) : ParameterGroup, ParameterHolder

A group of options that can be shown together in help output, or restricted to be cooccurring.

Link copied to clipboard
interface ParameterGroup

Functions

Link copied to clipboard

Make this group a co-occurring group.

Link copied to clipboard

If none of the options in a mutuallyExclusiveOptions group are given on the command line, us value for the group.

Link copied to clipboard

If a groupChoice or groupSwitch option is not called on the command line, use the value of the group with a switch or choice name.

Link copied to clipboard
fun <T : OptionGroup> RawOption.groupChoice(vararg choices: Pair<String, T>): ChoiceGroup<T, T?>

Convert the option to an option group based on a fixed set of values.

Link copied to clipboard
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.

Link copied to clipboard

Set the name and help for this option.

Link copied to clipboard
fun <T : Any> ParameterHolder.mutuallyExclusiveOptions(option1: OptionDelegate<out T?>, option2: OptionDelegate<out T?>, vararg options: OptionDelegate<out T?>, name: String? = null, help: String? = null): MutuallyExclusiveOptions<T, T?>

Declare a set of two or more mutually exclusive options.

Link copied to clipboard
Link copied to clipboard

If a groupChoice or groupSwitch option is not called on the command line, throw a MissingOption exception.

Make a mutuallyExclusiveOptions group required. If none of the options in the group are given, a UsageError is thrown.

Link copied to clipboard

If more than one of the group's options are given on the command line, throw a MutuallyExclusiveGroupException