Observable

interface Observable<T>(source)

An observable value can be accessed and can dispatch updates about state changes to interested parties

Parameters

<T>

the type of the value

Inheritors

Functions

Link copied to clipboard
abstract fun addObserver(observer: Observer<T>)
Add a new observer which is interested in updates about this value
Link copied to clipboard
abstract fun get(): T
Link copied to clipboard
open fun <V> map(mapper: (T) -> V): Observable<V>
Create a new Observable which will always have the value of mapper.apply(get()) and reports on updates accordingly.
Link copied to clipboard
open fun whenChanged(observer: Observer<T>)
Alias for addObserver.