list

protected open fun <T> list(initial: MutableList<T> = mutableListOf(), getTransform: (T) -> T = { it }, setTransform: (T) -> T = { it }, beforeAccess: (MutableList<T>) -> Unit = {}): DslReadOnlyListProperty<T>(source)

Creates a non-replaceable mutable list property delegate with element transformations and a hook.

Parameters

initial

Initial list.

getTransform

Transformation for getting elements.

setTransform

Transformation for setting elements.

beforeAccess

Hook before accessing the list.