|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
T - the type of the argument passed to the update method.public interface Observer<T>
A class can implement the Observer interface when it wants to be informed of
changes in observable objects.
This code (and documentation) is based on the Observer class provided with the Java SDK (
java.util.Observer), but extends it to use generics. The generic parameter
associated with this class allows the programmer to state the type of the object passed
using the update method. This is coupled with the generic Observervable
interface which supports a typed notifyAll method.
| Method Summary | |
|---|---|
void |
update(Observable<T> an_observable,
T an_argument)
This method is called whenever the observed object is changed. |
| Method Detail |
|---|
void update(Observable<T> an_observable,
T an_argument)
notifyObservers method to have all the object's
observers notified of the change.
an_observable - the observable object.an_argument - an argument passed to the notifyObservers method.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||