Interface Event<L>
- Type Parameters:
L- Event listener type.
- All Known Implementing Classes:
Event.Impl
public interface Event<L>
Represents an event that can be fired to invoke registered listeners.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddListener(L listener) voidbooleancontainsListener(L listener) Checks if a listener is added to thisEvent.invoker()booleanremoveListener(L listener)
-
Method Details
-
invoker
-
addListener
- Parameters:
listener- The listener that will be invoked when thisEventis fired.- Returns:
falseif the listener was already registered,trueotherwise.- Throws:
NullPointerException- If the argument isnull.
-
removeListener
- Parameters:
listener- The listener to be removed.- Returns:
trueif the listener was registered before removal,falseotherwise.- Throws:
NullPointerException- If the argument isnull.
-
clearListeners
-
containsListener
Checks if a listener is added to thisEvent.- Parameters:
listener- The listener to check for.- Returns:
trueif the listener is added,falseotherwise.- Throws:
NullPointerException- If the argument isnull.
-