|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.wimpi.modbus.util.Observable
public class Observable
A cleanroom implementation of the Observable pattern.
Constructor Summary | |
---|---|
Observable()
Constructs a new Observable instance. |
Method Summary | |
---|---|
void |
addObserver(Observer o)
Adds an observer instance if it is not already in the set of observers for this Observable. |
int |
getObserverCount()
|
void |
notifyObservers(Object arg)
Notifies all observer instances in the set of observers of this Observable. |
void |
removeObserver(Observer o)
Removes an observer instance from the set of observers of this Observable. |
void |
removeObservers()
Removes all observer instances from the set of observers of this Observable. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Observable()
Method Detail |
---|
public int getObserverCount()
public void addObserver(Observer o)
o
- an observer instance to be added.public void removeObserver(Observer o)
o
- an observer instance to be removed.public void removeObservers()
public void notifyObservers(Object arg)
arg
- an arbitrary argument to be passed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |