DefaultingContextParamType

class DefaultingContextParamType<V : Any, I : ContextIntention<I>>(id: Key, val default: V, validate: (V) -> Boolean = { true }, copy: (V) -> V = { it }) : ContextParamType<V, I>

A context parameter type that has a default value instead of null.

Constructors

Link copied to clipboard
constructor(id: Key, default: V, validate: (V) -> Boolean = { true }, copy: (V) -> V = { it })

Properties

Link copied to clipboard
val copy: (V) -> V

Copies a value.

Link copied to clipboard
val default: V

The default value of this parameter type. Used when no explicit value is defined and no autofiller could fill it.

Link copied to clipboard
val id: Key

The id of this parameter type, should be unique for I.

Link copied to clipboard
val validate: (V) -> Boolean

Validates whether a value meets the requirements of this parameter type.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String