T - the type of events processed by the listenerpublic final class EventListenerRegistrationData<T extends Event>
extends java.lang.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 | Description |
|---|---|
EventListenerRegistrationData(EventType<T> type,
EventListener<? super T> lstnr) |
Creates a new instance of
EventListenerRegistrationData. |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.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)java.lang.IllegalArgumentException - if a required parameter is nullpublic EventType<T> getEventType()
public EventListener<? super T> getListener()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
EventListenerRegistrationData are considered equal if they
reference the same listener and event type.equals in class java.lang.Objectobj - the object to be compared toCopyright © 2001–2018. All rights reserved.