tornadofx / tornadofx / kotlin.collections.MutableMap / toProperty

toProperty

fun <S, V, X : V> MutableMap<S, V>.toProperty(key: S, propertyGenerator: (X?) -> Property<X>): Property<X>

Convert the given key in this map to a Property using the given propertyGenerator function.

The generator is passed the initial value corresponding to the given key.

Changes to the generated Property will automatically be written back into the map.