Interface QueueListener<T>

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  QueueListener.Adapter<T>
      Deprecated.
      Since 2.1 and Java 8 the interface itself has default implementations.
      static class  QueueListener.Listeners<T>
      Queue listeners.
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void comparatorChanged​(Queue<T> queue, java.util.Comparator<T> previousComparator)
      Called when a queue's comparator has changed.
      default void itemDequeued​(Queue<T> queue, T item)
      Called when an item has been removed from the head of a queue.
      default void itemEnqueued​(Queue<T> queue, T item)
      Called when an item has been inserted into the tail of a queue.
      default void queueCleared​(Queue<T> queue)
      Called when a queue has been cleared.
    • Method Detail

      • itemEnqueued

        default void itemEnqueued​(Queue<T> queue,
                                  T item)
        Called when an item has been inserted into the tail of a queue.
        Parameters:
        queue - The queue that has been modified.
        item - The item that was just added to the queue.
      • itemDequeued

        default void itemDequeued​(Queue<T> queue,
                                  T item)
        Called when an item has been removed from the head of a queue.
        Parameters:
        queue - The queue in question.
        item - The item that was just removed from the head of the queue.
      • queueCleared

        default void queueCleared​(Queue<T> queue)
        Called when a queue has been cleared.
        Parameters:
        queue - The newly cleared queue object.
      • comparatorChanged

        default void comparatorChanged​(Queue<T> queue,
                                       java.util.Comparator<T> previousComparator)
        Called when a queue's comparator has changed.
        Parameters:
        queue - The queue that changed.
        previousComparator - Previous value of the queue's comparator (if any).