Observable

public 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
public abstract void addObserver(Observer<T> observer)
Add a new observer which is interested in updates about this value
Link copied to clipboard
public abstract T get()
Link copied to clipboard
public Observable<V> map<V>(Function<T, V> mapper)
Create a new Observable which will always have the value of mapper.apply(get()) and reports on updates accordingly.
Link copied to clipboard
public void whenChanged(Observer<T> observer)
Alias for addObserver.