Interface ChangeObserver<T>
- Type Parameters:
T- the value type
Observes the changes of an
Observable, notified with a Change when the observable notifies a value
differing from the one before, by Objects.deepEquals(Object, Object).
previous() and current() observe the values themselves, for a method reference taking the value:
observable.changed().current().addConsumer(this::load). On a change, the consumers of this observer are
notified first, then those of previous(), then those of current().
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface Observer
Observer.Builder<T,B> -
Method Summary
Methods inherited from interface Observer
addConsumer, addWeakConsumer, observer, removeConsumer, removeWeakConsumer, sensor, when, whenMethods inherited from interface Sensor
addListener, addWeakListener, removeListener, removeWeakListener
-
Method Details
-
previous
- Returns:
- an
Observernotified with theChange.previous()value on each change
-
current
- Returns:
- an
Observernotified with theChange.current()value on each change
-