public class EventListenerList2<T extends java.util.EventListener>
extends java.lang.Object
implements java.io.Serializable
EventListenerList
.Constructor and Description |
---|
EventListenerList2(java.lang.Class<? extends java.util.EventListener> t)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
add(T listener)
Adds a listener.
|
int |
getListenerCount()
Returns the number of registered listeners.
|
T[] |
getListeners()
Returns an array of all the listeners.
|
void |
remove(T listener)
Removes a listener.
|
java.lang.String |
toString() |
public EventListenerList2(@NotNull java.lang.Class<? extends java.util.EventListener> t)
t
- the listener's type@NotNull public T[] getListeners()
public int getListenerCount()
public void add(@NotNull T listener)
listener
- the listenerpublic void remove(@NotNull T listener)
listener
- the listener@NotNull public java.lang.String toString()
toString
in class java.lang.Object