T - the generic type of the observable.O - the generic type of the observerpublic interface Subject<T,O extends Observer<T>>
Subject represents the "subject" (which is being "observed") being part of
the object whose state change is being observed, to be communicated to the observers upon
occurrence.| Modifier and Type | Method and Description |
|---|---|
default void |
add(O observer)
Adds the given observer.
|
default void |
addAll(Collection<O> observers)
Adds the given observers.
|
T |
getObservable()
Gets the observable.
|
List<O> |
getObservers()
Gets the observers that wants to be notified on changes.
|
default void |
remove(O observer)
Removes the given observer.
|
default void |
removeAll(Collection<O> observers)
Removes the given observers.
|
void |
setObservable(T observable)
Sets the observable.
|
default void |
updateObservers()
Update observers.
|
default void add(O observer)
observer - the observer to be added.default void addAll(Collection<O> observers)
observers - the observers to be added.T getObservable()
List<O> getObservers()
default void remove(O observer)
observer - the observer to be remove.default void removeAll(Collection<O> observers)
observers - the observers to be remove.void setObservable(T observable)
observable - the new observabledefault void updateObservers()
Copyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.