AritySetOptionBuilder

Builder for arity-based set options that return nullable sets of lists.

This class is created when calling .arity(n) on a set option builder. Each invocation of the option consumes exactly n values to create a sublist. Returns Set<List<T>>? (nullable) - use .required() to get non-nullable.

Parameters

T

The element type of the values in the sublists

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Sets a default value for this set arity option, making it non-nullable. The default value should be a Set> where each sublist has exactly arityCount elements.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun onValue(callback: (List<T>) -> Unit): AritySetOptionBuilder<T>

Registers a callback to be invoked when this set arity option receives values. The callback receives the complete Set>? value.

Link copied to clipboard
open operator override fun provideDelegate(thisRef: Arguments, property: KProperty<*>): ReadOnlyProperty<Arguments, Set<List<T>>?>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <U> requireIfValue(ref: KProperty<U>, predicate: (U?) -> Boolean): AritySetOptionBuilder<T>
Link copied to clipboard
fun validate(message: String = "Invalid arity group for @name: @value", predicate: (List<T>) -> Boolean): AritySetOptionBuilder<T>
Link copied to clipboard
fun validateCollection(message: String = "Invalid collection for @name: @value", predicate: (Set<List<T>>?) -> Boolean): AritySetOptionBuilder<T>

Validates the entire collection of arity groups for this set option. The predicate receives the complete Set>? value.