public class ListenerList
extends java.lang.Object
Constructor and Description |
---|
ListenerList(int capacity)
Creates a listener list with the given initial capacity.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Object listener)
Adds a listener to the list.
|
java.lang.Object[] |
getListeners()
Returns an array containing all the registered listeners.
|
void |
remove(java.lang.Object listener)
Removes a listener from the list.
|
void |
removeAll()
Removes all the listeners from the list.
|
int |
size()
Returns the number of registered listeners
|
public ListenerList(int capacity)
capacity
- the number of listeners which this list can initially accept
without growing its internal representation; must be at least 1public void add(java.lang.Object listener)
listener
- a listenerpublic java.lang.Object[] getListeners()
public void remove(java.lang.Object listener)
listener
- a listenerpublic void removeAll()
public int size()
Copyright (c) IBM Corp. and others 2000, 2010. All Rights Reserved.