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
Modifier and TypeMethodDescriptionvoidAdds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set.voidMarks this object as no longer having been changed.intReturns the number of the observers of this Observable object.voidDeletes an observer from the set of observers of this object.voidClears the observer list so that this object no longer has any observer.booleanTest if this object has changed.voidnotifyObservers(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.voidMarks this object as having been changed.
-
Method Details
-
addObserver
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
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
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.
-