com.lc.util
Class FilteredEventListenerList
java.lang.Object
|
+--com.lc.util.FilteredEventListenerList
- public class FilteredEventListenerList
- extends java.lang.Object
Modified version of EventListenerList,
for implementing FilteredEventSupport.
A class that holds a list of FilteredEventSupport.ListenerEntry,
associated to the class of some EventObject.
- Version:
- issued from 1.32 03/02/01 (out of JDK 1.4 b2)
- Author:
- Laurent Caillette, Sun Microsystems
|
Field Summary |
protected java.lang.Object[] |
listenerList
The list of ListenerType - Listener pairs |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
listenerList
protected transient java.lang.Object[] listenerList
- The list of ListenerType - Listener pairs
FilteredEventListenerList
public FilteredEventListenerList()
getListenerList
protected java.lang.Object[] getListenerList()
contains
public boolean contains(java.lang.Class t,
FilteredEventSupport.ListenerEntry entry)
- Checks if, for a given class, there is an equivalent ListenerEntry
in the list.
Comparison with entry's listener is performed by address,
comparison with entry's event filter is made using
IEventFilter.sameFilterAs( IEventFilter ).
- Parameters:
t - The class to which the entry's listener is associated.entry - The entry to search equivalence from.- Returns:
- true if found.
getListenerEntries
public FilteredEventSupport.ListenerEntry[] getListenerEntries(java.lang.Class t)
getListeners
public java.util.EventListener[] getListeners(java.lang.Class t,
IEventFilter filter)
getListenerCount
public int getListenerCount()
getListenerCount
public int getListenerCount(java.lang.Class t)
add
public void add(java.lang.Class t,
FilteredEventSupport.ListenerEntry entry)
remove
public void remove(java.lang.Class t,
FilteredEventSupport.ListenerEntry entry)
- Removes the listener as a listener of the specified type.
- Parameters:
t - the type of the listener to be removedl - the listener to be removed
toString
public java.lang.String toString()
- Returns a string representation of the EventListenerList.
- Overrides:
toString in class java.lang.Object