replaceable List
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.
get Transform
Transformation for getting elements.
set Transform
Transformation for setting elements.
before Access
Hook before accessing the list.
before Replace
Hook before replacing the list.