Option

interface Option<OptionKeyType : Enum<OptionKeyType>>

An Option comprises an enumerated type which defines the domain of the option, the keywords which parsers may use to identify the option, an end-user friendly description of the option, and an action that should be performed each time that the option is set.

Author

Todd L Smith

Leslie Schultz

Parameters

OptionKeyType

The type of the option.

Properties

Link copied to clipboard
abstract val action: OptionProcessorFactory.OptionInvocation<OptionKeyType>.() -> Unit?

The action that should be performed upon setting of this option. This action is provided when no argument is to be supplied for the option. Exactly one of action or action2 should be set to a non-null value.

Link copied to clipboard
abstract val action2: OptionProcessorFactory.OptionInvocationWithArgument<OptionKeyType>.() -> Unit?

The action that should be performed upon setting of this option. This action is provided when an argument is required for the option. Exactly one of action or action2 should be set to a non-null value.

Link copied to clipboard
abstract val cardinality: OptionProcessorFactory.Cardinality

The Cardinality of this option. There may be stricter conditions that can be further checked by OptionProcessor.checkEncountered or a custom OptionProcessorFactory.rule.

Link copied to clipboard
abstract val description: String

Answer an end-user comprehensible description of the option.

Link copied to clipboard
abstract val key: OptionKeyType

The option key, a member of the enumeration which defines this option space.

Link copied to clipboard
abstract val keywords: MutableSet<String>

The set of keywords that indicate this option.

Link copied to clipboard
open val takesArgument: Boolean