ValueObservable

abstract class ValueObservable<T>

Basic observable with value.

Constructors

Link copied to clipboard
fun ValueObservable()

Empty constructor.

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 removeListener(listener: ValueObserver<T>): Boolean

Removes a listener.

Inheritors

Link copied to clipboard
Link copied to clipboard