Package java.util
Interface Observer
public interface Observer
Observer is the interface to be implemented by objects that
receive notification of updates on an Observable object.- See Also:
Observable
-
Method Summary
Modifier and Type Method Description voidupdate(Observable observable, Object data)This method is called if the specifiedObservableobject'snotifyObserversmethod is called (because theObservableobject has been updated.
-
Method Details
-
update
This method is called if the specifiedObservableobject'snotifyObserversmethod is called (because theObservableobject has been updated.- Parameters:
observable- theObservableobject.data- the data passed toObservable.notifyObservers(Object).
-