Interface Observable

All Known Implementing Classes:
DICOM_Receiver

public interface Observable
An interface for the Observable
Version:
1.0 05/11/06
Author:
Hailong Wang
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set.
    void
    Marks this object as no longer having been changed.
    int
    Returns the number of the observers of this Observable object.
    void
    Deletes an observer from the set of observers of this object.
    void
    Clears the observer list so that this object no longer has any observer.
    boolean
    Test if this object has changed.
    void
    If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
    void
    Marks this object as having been changed.
  • Method Details

    • addObserver

      void addObserver(Observer o)
      Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set.
      Parameters:
      o - an observer object.
    • clearChanged

      void clearChanged()
      Marks this object as no longer having been changed.
    • countObservers

      int countObservers()
      Returns the number of the observers of this Observable object.
      Returns:
      the number of the observers of this Observable object.
    • deleteObserver

      void deleteObserver(Observer o)
      Deletes an observer from the set of observers of this object.
      Parameters:
      o - an observer object.
    • deleteObservers

      void deleteObservers()
      Clears the observer list so that this object no longer has any observer.
    • hasChanged

      boolean hasChanged()
      Test if this object has changed.
      Returns:
      true if the object has changed.
    • notifyObservers

      void notifyObservers(Object obj)
      If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
      Parameters:
      obj - the argument object
    • setChanged

      void setChanged()
      Marks this object as having been changed.