T
- The precise type of valuepublic interface R2WatchableType<T>
A watchable value.
This is very similar to Observable
except that it is
strongly typed and implementations are required to use weak references to
observers so that the observers do not prevent the observed values from being
garbage collected.
Modifier and Type | Method and Description |
---|---|
void |
watchableAdd(Consumer<T> w)
Add a watcher.
|
void |
watchableChanged()
Notify all watchers that the value has changed.
|
void |
watchableRemove(Consumer<T> w)
Remove a watcher.
|
void watchableAdd(Consumer<T> w)
watchableChanged()
is called.w
- The watchervoid watchableChanged()
Copyright © 2017 <code@io7m.com> http://io7m.com