tornadofx / tornadofx / SetConversionListener

SetConversionListener

class SetConversionListener<SourceType, TargetType> : SetChangeListener<SourceType>, WeakListener

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

Constructors

<init> SetConversionListener(targetList: MutableList<TargetType>, converter: (SourceType) -> TargetType)

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

Properties

converter val converter: (SourceType) -> TargetType

Functions

equals fun equals(other: Any?): Boolean
hashCode fun hashCode(): Int
onChanged fun onChanged(change: Change<out SourceType>): 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>