Option List Builder
Builder for creating command-line list options with various configurations and constraints.
This class provides a fluent API for defining list options that can collect multiple values, including type refinements, constraints, environment variable support, and help text.
Functions
Creates an arity option for lists where each invocation consumes exactly n
values.
Requires this list option to have at least the specified number of values. This constraint is validated after parsing completes.
Creates an "at least one" constraint with other options. At least one option from this group (including this option) must be provided.
Creates an "at most one" constraint with other options. At most one option from this group (including this option) may be provided.
Specifies that this list option conflicts with other options. If this option is provided along with any of the conflicting options, parsing will fail with an error.
Creates an "exactly one" constraint with other options. Exactly one option from this group (including this option) must be provided.
Restricts this list option to only be available in specific domains. When specified, this option will only be recognized when one of the referenced domains is active.
Registers a callback to be executed when this collection option's values are found during parsing. The callback receives each converted value and is executed after all parsing and validation completes. For collection options, the callback is called once for each element in the collection.
Provides the property delegate implementation for collection options. This method is called automatically by Kotlin's property delegation system. It registers the option with the Arguments instance and returns a delegate that provides access to the parsed collection value.
Marks this list option as required, equivalent to atLeast(1).
Makes this list option required if all of the referenced options are present. This creates a conditional requirement where providing all of the trigger options makes this option mandatory.
Makes this list option required if any of the referenced options are present. This creates a conditional requirement where providing any of the trigger options makes this option mandatory.
Adds a validator that checks the entire list against the given predicate.