public class EventListenerList
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
EventListenerList.Entry
EventListenerTable entry class.
|
Modifier and Type | Field and Description |
---|---|
protected IntTable |
counts
Counts of listener entries with a given namespace URI.
|
protected EventListenerList.Entry |
head
Linked list of entries.
|
protected EventListenerList.Entry[] |
listeners
Cache of listeners with any namespace URI.
|
protected java.util.HashMap |
listenersNS
Caches of listeners with a given namespace URI.
|
protected int |
n
Total number of event listners.
|
Constructor and Description |
---|
EventListenerList() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(java.lang.String namespaceURI,
java.lang.Object group,
EventListener listener)
Adds a listener.
|
EventListenerList.Entry[] |
getEventListeners()
Returns an array containing all event listener entries.
|
EventListenerList.Entry[] |
getEventListeners(java.lang.String namespaceURI)
Returns an array of EventListeners that match the given namespace URI.
|
boolean |
hasEventListener(java.lang.String namespaceURI)
Returns whether there is an event listener for the given namespace URI.
|
void |
removeListener(java.lang.String namespaceURI,
EventListener listener)
Removes a listener.
|
int |
size()
Returns the number of event listeners stored in this object.
|
protected int n
protected EventListenerList.Entry head
protected IntTable counts
protected EventListenerList.Entry[] listeners
protected java.util.HashMap listenersNS
public void addListener(java.lang.String namespaceURI, java.lang.Object group, EventListener listener)
public void removeListener(java.lang.String namespaceURI, EventListener listener)
public EventListenerList.Entry[] getEventListeners()
public EventListenerList.Entry[] getEventListeners(java.lang.String namespaceURI)
public boolean hasEventListener(java.lang.String namespaceURI)
public int size()
Copyright © 2022 Apache Software Foundation. All Rights Reserved.