BaseObservable

abstract class BaseObservable<T> : Observable<T> (source)

Base class for an Observable which takes care of the observer saving

Inheritors

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open 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.