pivot.util
Class ListenerList<T>

java.lang.Object
  extended by pivot.util.ListenerList<T>
All Implemented Interfaces:
java.lang.Iterable<T>
Direct Known Subclasses:
List.ListListenerList, Map.MapListenerList, Set.SetListenerList, SynchronizedListenerList

public abstract class ListenerList<T>
extends java.lang.Object
implements java.lang.Iterable<T>

Abstract base class for listener lists.

NOTE This class is not thread safe. For thread-safe management of events, use SynchronizedListenerList.

Author:
gbrown

Constructor Summary
ListenerList()
           
 
Method Summary
 void add(T listener)
          Adds a listener to the list, if it has not previously been added.
 java.util.Iterator<T> iterator()
           
 void remove(T listener)
          Removes a listener from the list, if it has previously been added.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListenerList

public ListenerList()
Method Detail

add

public void add(T listener)
Adds a listener to the list, if it has not previously been added.

Parameters:
listener -

remove

public void remove(T listener)
Removes a listener from the list, if it has previously been added.

Parameters:
listener -

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T>