public class Observers<T> extends ArrayList<Observer<? super T>>
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
Serial version
|
modCount
Constructor and Description |
---|
Observers()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addObserver(Observer<? super T> o)
Add an observer to the object.
|
void |
notifyObservers(T owner)
Notify the observers of the changed object.
|
void |
removeObserver(Observer<? super T> o)
Remove an observer from the object.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
private static final long serialVersionUID
public void addObserver(Observer<? super T> o)
o
- Observer to addpublic void removeObserver(Observer<? super T> o)
o
- Observer to removepublic void notifyObservers(T owner)
owner
- Owner of the Observers list - changed instance