T
- the type of events processed by the listenerpublic final class EventListenerRegistrationData<T extends Event> extends Object
A data class holding information about an event listener registration.
An instance of this class stores all information required to determine
whether a specific event listener is to be invoked for a given event. The
class is used internally by EventListenerList
, but is also useful in
general when information about event listeners is to be stored.
Implementation note: Instances of this class are immutable and can safely be shared between multiple threads or components.
Constructor and Description |
---|
EventListenerRegistrationData(EventType<T> type,
EventListener<? super T> lstnr)
Creates a new instance of
EventListenerRegistrationData . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compares this object with another one.
|
EventType<T> |
getEventType()
Returns the event type for this listener registration.
|
EventListener<? super T> |
getListener()
Returns the listener this registration is about.
|
int |
hashCode() |
public EventListenerRegistrationData(EventType<T> type, EventListener<? super T> lstnr)
EventListenerRegistrationData
.type
- the event type (must not be null)lstnr
- the event listener (must not be null)IllegalArgumentException
- if a required parameter is nullpublic EventType<T> getEventType()
public EventListener<? super T> getListener()
public boolean equals(Object obj)
EventListenerRegistrationData
are considered equal if they
reference the same listener and event type.Copyright © 2001–2018 The Apache Software Foundation. All rights reserved.