Property

open class Property<T>(initialValue: T) : ReadonlyProperty<T>

Property baseclass providing observable fields.

Parameters

T

Type of boxed data.

initialValue

Initial value of this property.

Constructors

Link copied to clipboard
fun <T> Property(initialValue: T)

Creates a Property with given initial value.

Functions

Link copied to clipboard
fun addListener(listener: ValueObserver<T>)

Adds a listener silently.

Link copied to clipboard
fun addListenerAndInvoke(initialValue: T, listener: (T, T) -> Unit)

Adds a listener and calls ValueObserver.update on this new listener with given initial value.

Link copied to clipboard
fun clearListeners()

Removes all listeners.

Link copied to clipboard
fun notifyUnchanged()

Notifies all listeners with current value.

Link copied to clipboard
fun removeListener(listener: ValueObserver<T>): Boolean

Removes a listener.

Properties

Link copied to clipboard
open override var value: T

Value of this property.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard