|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An Observable is a Xholon that is observed by another Xholon.
on Java.util.Observable class; inspired by Gamma et al. (1995). Design Patterns. (Observer pattern)
Field Summary |
Fields inherited from interface org.primordion.xholon.base.IXholon |
DEFAULT_SIZE_MSG_Q, NINCLUDE_PSC, NINCLUDE_PSx, NINCLUDE_PxC, NINCLUDE_Pxx, NINCLUDE_xSC, NINCLUDE_xSx, NINCLUDE_xxC, NINCLUDE_xxx |
Method Summary | |
void |
addObserver(IXholon o)
Adds an observer to the set of observers for this object. |
int |
countObservers()
Returns the number of observers of this Observable object. |
void |
deleteObserver(IXholon 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. |
java.lang.Object |
getChangedData()
Get changed data. |
boolean |
hasChanged()
Tests if this object has changed. |
void |
notifyObservers()
If this object has changed, then notify all of its observers. |
void |
notifyObservers(java.lang.Object arg)
If this object has changed, then notify all of its observers. |
Method Detail |
public void addObserver(IXholon o)
o
- An observer.public int countObservers()
public void deleteObserver(IXholon o)
o
- An observer.public void deleteObservers()
public void notifyObservers()
public void notifyObservers(java.lang.Object arg)
arg
- Some data.public boolean hasChanged()
public java.lang.Object getChangedData()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |