O - observer type accepted by this ObservableP - observer type accepted by the underlying ObservableU - type of the underlying observable to which observers are delegatedpublic abstract class ProxyObservable<O,P,U extends Observable<P>> extends java.lang.Object implements Observable<O>
| Modifier | Constructor and Description |
|---|---|
protected |
ProxyObservable(U underlying) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract P |
adaptObserver(O observer)
Adapts the given observer to observer of the underlying
Observable.
|
void |
addObserver(O observer) |
protected U |
getUnderlyingObservable() |
Subscription |
observe(O observer) |
void |
removeObserver(O observer) |
protected ProxyObservable(U underlying)
protected abstract P adaptObserver(O observer)
Important: It is required that the transformation applied to two observers that are _equal_ yields two adapted observers that are _equal_. In other words, if `o1.equals(o2)`, then it must be the case that `adaptObserver(o1).equals(adaptObserver(o2))`.
observer - observer to be adapted for the underlying
Observableprotected final U getUnderlyingObservable()
public final void addObserver(O observer)
addObserver in interface Observable<O>public final void removeObserver(O observer)
removeObserver in interface Observable<O>public final Subscription observe(O observer)
observe in interface Observable<O>