Interface EventListenerSupport<T>

All Known Implementing Classes:
DefaultEventListenerSupport

public interface EventListenerSupport<T>
An interface to provide support for EventListeners.
Since:
3.2.0
Author:
Joel Uckelman
  • Method Details

    • addEventListener

      void addEventListener(EventListener<? super T> l)
      Adds an EventListener.
      Parameters:
      l - the listener to add
    • removeEventListener

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

      boolean hasEventListeners()
      Checks whether there are any EventListeners.
      Returns:
      true if there are any listeners
    • getEventListeners

      List<EventListener<? super T>> getEventListeners()
      Gets the list of listeners.
      Returns:
      the list of listeners
    • notify

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