|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IObservable
| Method Summary | |
|---|---|
void |
addObserver(java.util.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. |
int |
countObservers()
Returns the number of observers of this Observable object. |
void |
deleteObserver(java.util.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 observers. |
boolean |
hasChanged()
Tests if this object has changed. |
void |
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. |
void |
notifyObservers(java.lang.Object arg)
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. |
| Method Detail |
|---|
void addObserver(java.util.Observer o)
o - an observer to be added.
java.lang.NullPointerException - if the parameter o is null.void deleteObserver(java.util.Observer o)
null to this method will have
no effect.
o - the observer to be deleted.void notifyObservers()
hasChanged method, then notify all of its observers
and then call the clearChanged method to indicate that this object has no longer changed.
Each observer has its update method called with two arguments: this observable object and
null. In other words, this method is equivalent to:
notifyObservers(null)
Observable.clearChanged(),
Observable.hasChanged(),
Observer.update(java.util.Observable, java.lang.Object)void notifyObservers(java.lang.Object arg)
hasChanged method, then notify all of its observers
and then call the clearChanged method to indicate that this object has no longer changed.
Each observer has its update method called with two arguments: this observable object and the
arg argument.
arg - any object.Observable.clearChanged(),
Observable.hasChanged(),
Observer.update(java.util.Observable, java.lang.Object)void deleteObservers()
boolean hasChanged()
true if and only if the setChanged method has been called more recently than
the clearChanged method on this object; false otherwise.Observable.clearChanged(),
Observable.setChanged()int countObservers()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||