replaceableList

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

Creates a replaceable list property delegate with element transformations and hooks.

Parameters

initial

Initial list.

getTransform

Transformation for getting elements.

setTransform

Transformation for setting elements.

beforeAccess

Hook before accessing the list.

beforeReplace

Hook before replacing the list.