Type Parameters:
T - the generic type of the observable object that the observer is interested in
All Known Implementing Classes:
AbstractObserver, ChatRoomUser

public interface Observer<T>
The Interface Observer represents an observer in the Observer design pattern It defines a contract for objects that should be notified of changes in an observable subject
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    update(T observable)
    This method is called to notify the observer of changes in the observable object Implementing classes should define the specific behavior that occurs when the observable object changes
  • Method Details

    • update

      void update(T observable)
      This method is called to notify the observer of changes in the observable object Implementing classes should define the specific behavior that occurs when the observable object changes
      Parameters:
      observable - the observable object that has changed