tornadofx / tornadofx / MapConversionListener

MapConversionListener

class MapConversionListener<SourceTypeKey, SourceTypeValue, TargetType> : MapChangeListener<SourceTypeKey, SourceTypeValue>, WeakListener

Listens to changes on a Map of SourceTypeKey to SourceTypeValue and keeps the target list in sync by converting each object into the TargetType via the supplied converter.

Constructors

<init> MapConversionListener(targetList: MutableList<TargetType>, converter: (SourceTypeKey, SourceTypeValue) -> TargetType)

Listens to changes on a Map of SourceTypeKey to SourceTypeValue and keeps the target list in sync by converting each object into the TargetType via the supplied converter.

Properties

converter val converter: (SourceTypeKey, SourceTypeValue) -> TargetType

Functions

equals fun equals(other: Any?): Boolean
hashCode fun hashCode(): Int
onChanged fun onChanged(change: Change<out SourceTypeKey, out SourceTypeValue>): Unit
wasGarbageCollected fun wasGarbageCollected(): Boolean

Extension Functions

getProperty fun <T> Any.getProperty(prop: KMutableProperty1<*, T>): ObjectProperty<T>
observable fun <T : Any> Any.observable(propName: String): ObjectProperty<T>