|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blackjackanalyst.ObserverList<T>
T
- the type of observer in the listpublic class ObserverList<T>
A list of observers.
Method Summary | |
---|---|
boolean |
add(T obj)
Adds the given observer to the list of observers. |
void |
clear()
Removes all the observers from the list. |
boolean |
contains(T obj)
Returns whether the list contains the given observer. |
boolean |
isEmpty()
Returns whether the observer list is empty, meaning its size equals 0 . |
java.util.Iterator<T> |
iterator()
Returns an iterator over the list of observers. |
boolean |
remove(T obj)
Removes the given observer from the list of observers. |
int |
size()
Returns the number of observers in the list. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int size()
public boolean isEmpty()
0
.
true
if the observer list is empty,
false
otherwisepublic boolean contains(T obj)
obj
is null
, this method returns
false
.
obj
- the observer to query for membership in the list
true
if the list contains the observer,
false
otherwisepublic java.util.Iterator<T> iterator()
public boolean add(T obj)
obj
is null
, this method returns
false
and the underlying list remains unchanged.
obj
- the observer to add to the list
true
if the observer is added to the list,
false
otherwisepublic boolean remove(T obj)
obj
is null
or the list does not contain
the observer, this method returns false
and the underlying
list remains unchanged.
obj
- the observer to remove from the list
true
if the observer is removed from the list,
false
otherwisepublic void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |