Interface MultiEventListenerSupport

All Known Implementing Classes:
DefaultMultiEventListenerSupport

public interface MultiEventListenerSupport
An interface to provide support for EventListeners.
Since:
3.2.0
Author:
Joel Uckelman
  • Method Details

    • addEventListener

      <T> void addEventListener(Class<T> c, EventListener<? super T> l)
      Adds an EventListener.
      Parameters:
      c - the class to listen for
      l - the listener to add
    • removeEventListener

      <T> void removeEventListener(Class<T> c, EventListener<? super T> l)
      Removes an EventListener.
      Parameters:
      c - the class to check
      l - the listener to remove
    • hasEventListeners

      boolean hasEventListeners(Class<?> c)
      Checks whether there are any EventListeners.
      Parameters:
      c - the class to check
      Returns:
      true if there are any listeners for the given class
    • getEventListeners

      <T> List<EventListener<? super T>> getEventListeners(Class<T> c)
      Gets the list of listeners.
      Parameters:
      c - the class to check
      Returns:
      the list of listeners for the given class
    • notify

      void notify(Object event)
      Notify the listeners of an event.
      Parameters:
      event - the event to send