Package gov.nih.mipav.model.util
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.void
clearChanged()
Marks this object as no longer having been changed.int
countObservers()
Returns the number of the observers of this Observable object.void
deleteObserver(Observer o)
Deletes an observer from the set of observers of this object.void
deleteObservers()
Clears the observer list so that this object no longer has any observer.boolean
hasChanged()
Test if this object has changed.void
notifyObservers(java.lang.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.void
setChanged()
Marks this object as having been changed.
-
-
-
Method Detail
-
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(java.lang.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.
-
-