|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IObservable
Method Summary | |
---|---|
void |
addObserver(IObserver 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 |
notifyObservers(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(IObserver o)
o
- an observer to be added.
NullPointerException
- if the parameter o is null.void notifyObservers(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.IObserver.update(IObservable, java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |