Class EventListeners<K,V>
- java.lang.Object
-
- org.eclipse.osgi.framework.eventmgr.EventListeners<K,V>
-
public class EventListeners<K,V> extends Object
Deprecated.As of 3.5. Replaced by CopyOnWriteIdentityMap.This class manages a list of listeners. Listeners may be added or removed as necessary. This class uses identity for comparison, not equals.- Since:
- 3.1
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Constructor Description EventListeners()
Deprecated.Creates an empty listener list.EventListeners(int capacity)
Deprecated.Creates an empty listener list.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addListener(K listener, V listenerObject)
Deprecated.Add a listener to the list.void
removeAllListeners()
Deprecated.Remove all listeners from the list.void
removeListener(K listener)
Deprecated.Remove a listener from the list.
-
-
-
Method Detail
-
addListener
public void addListener(K listener, V listenerObject)
Deprecated.Add a listener to the list. If a listener object is already in the list, then it is replaced. This method calls the put method.- Parameters:
listener
- This is the listener object to be added to the list.listenerObject
- This is an optional listener-specific object. This object will be passed to the EventDispatcher along with the listener when the listener is to be called. This may be null- Throws:
NullPointerException
- If listener is null.
-
removeListener
public void removeListener(K listener)
Deprecated.Remove a listener from the list. This method calls the remove method.- Parameters:
listener
- This is the listener object to be removed from the list.- Throws:
NullPointerException
- If listener is null.
-
removeAllListeners
public void removeAllListeners()
Deprecated.Remove all listeners from the list. This method calls the clear method.
-
-