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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void update​(Observable observable, Object data)
      This method is called if the specified Observable object's notifyObservers method is called (because the Observable object has been updated.
    • Method Detail

      • update

        void update​(Observable observable,
                    Object data)
        This method is called if the specified Observable object's notifyObservers method is called (because the Observable object has been updated.
        Parameters:
        observable - the Observable object.
        data - the data passed to Observable.notifyObservers(Object).