![JAR search and dependency download from the Maven repository](/logo.png)
commonMain.ru.casperix.signals.concrete.NotifyProperty.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of signals Show documentation
Show all versions of signals Show documentation
Signals for all occasions
package ru.casperix.signals.concrete
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
class NotifyProperty(private var self: Custom, private val signal: EmptySignal) : ReadWriteProperty {
override fun getValue(thisRef: Any, property: KProperty<*>): Custom {
return self
}
override fun setValue(thisRef: Any, property: KProperty<*>, value: Custom) {
if (self == value) return
self = value
signal.set()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy