list
protected open fun <T> list(initial: MutableList<T> = mutableListOf(), getTransform: DslMutableList<T>.(T) -> T = { it }, setTransform: DslMutableList<T>.(T) -> T = { it }, beforeGet: DslMutableList<T>.(index: Int) -> Unit = {}, beforeSet: DslMutableList<T>.(index: Int, element: T) -> Unit = { _, _ -> }, beforeRemove: DslMutableList<T>.(index: Int) -> Unit = {}, beforeAccess: DslMutableList<T>.() -> Unit = {}, accessTransform: DslMutableList<T>.() -> MutableList<T> = { this }, getDslMutableList: (DslMutableList<T>) -> Unit = {}): DslReadOnlyListProperty<T>(source)
Creates a non-replaceable mutable list property delegate with element transformations and a hook.
Parameters
initial
Initial list.
get Transform
Transformation for getting elements.
set Transform
Transformation for setting elements.
before Get
Hook before getting an element.
before Set
Hook before setting an element.
before Remove
Hook before removing an element.
before Access
Hook before accessing the list.
access Transform
Transformation to the list when accessed.
get Dsl Mutable List
Function to get the DslMutableList instance.