Package gov.nih.mipav.model.util
Interface Observable
-
- All Known Implementing Classes:
DICOM_Receiver
public interface ObservableAn 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 voidaddObserver(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.voidclearChanged()Marks this object as no longer having been changed.intcountObservers()Returns the number of the observers of this Observable object.voiddeleteObserver(Observer o)Deletes an observer from the set of observers of this object.voiddeleteObservers()Clears the observer list so that this object no longer has any observer.booleanhasChanged()Test if this object has changed.voidnotifyObservers(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.voidsetChanged()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.
-
-