Package org.eclipse.net4j.util.event
Class EventUtil
- java.lang.Object
-
- org.eclipse.net4j.util.event.EventUtil
-
public final class EventUtil extends java.lang.Object
- Author:
- Eike Stepper
-
-
Field Summary
Fields Modifier and Type Field Description static IListener[]
NO_LISTENERS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E extends IEvent>
java.lang.AutoCloseableaddListener(java.lang.Object notifier, java.lang.Class<E> eventType, java.util.function.Consumer<E> eventConsumer)
static boolean
addListener(java.lang.Object notifier, IListener listener)
static boolean
addUniqueListener(java.lang.Object notifier, IListener listener)
static IListener[]
getListeners(java.lang.Object notifier)
static boolean
hasListener(java.lang.Object notifier, IListener listener)
static boolean
removeListener(java.lang.Object notifier, IListener listener)
-
-
-
Field Detail
-
NO_LISTENERS
public static final IListener[] NO_LISTENERS
- Since:
- 3.0
-
-
Method Detail
-
addUniqueListener
public static boolean addUniqueListener(java.lang.Object notifier, IListener listener)
- Since:
- 3.2
-
addListener
public static boolean addListener(java.lang.Object notifier, IListener listener)
-
addListener
public static <E extends IEvent> java.lang.AutoCloseable addListener(java.lang.Object notifier, java.lang.Class<E> eventType, java.util.function.Consumer<E> eventConsumer)
- Since:
- 3.15
-
removeListener
public static boolean removeListener(java.lang.Object notifier, IListener listener)
-
getListeners
public static IListener[] getListeners(java.lang.Object notifier)
-
hasListener
public static boolean hasListener(java.lang.Object notifier, IListener listener)
- Since:
- 3.2
-
-