public class Observable extends java.lang.Object implements QuackObservable
Modifier and Type | Field and Description |
---|---|
(package private) QuackObservable |
duck |
(package private) java.util.ArrayList<Observer> |
observers |
Constructor and Description |
---|
Observable(QuackObservable duck) |
Modifier and Type | Method and Description |
---|---|
java.util.Iterator |
getObservers() |
void |
notifyObservers() |
void |
registerObserver(Observer observer) |
QuackObservable duck
public Observable(QuackObservable duck)
public void registerObserver(Observer observer)
registerObserver
in interface QuackObservable
public void notifyObservers()
notifyObservers
in interface QuackObservable
public java.util.Iterator getObservers()