|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This interface defines a generic Observable interface. This is desirable as the java.util.Observable is a class which could force unnatural hierarchies. It also allows public access to a list of Observers as an array which may not be the actual collection of observers, allowing implementers to let others know what they are observing without allowing them to modify that list through "illegal" channels.
| Method Summary | |
void |
addObserver(Observer observer)
Adds an observer to the observer list. |
void |
deleteObserver(Observer observer)
Deletes an observer from the observer list. |
void |
deleteObservers()
Deletes all observers from the observer list. |
Observer[] |
getObservers()
Answers a collection of observers. |
void |
notifyObservers()
Notifies all observers that an observable change occurs. |
void |
notifyObservers(java.lang.Object arg)
Notifies all observers that an observable change occurred. |
| Method Detail |
public void addObserver(Observer observer)
observer - the observer to be added.public void deleteObserver(Observer observer)
observer - the observer to be deleted.public void deleteObservers()
public Observer[] getObservers()
public void notifyObservers()
public void notifyObservers(java.lang.Object arg)
arg - info to pass along to those being notified.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||