Package org.apache.pivot.collections
Interface QueueListener<T>
-
- Type Parameters:
T
- The type of object stored in this queue.
- All Known Implementing Classes:
QueueListener.Adapter
,QueueListener.Listeners
public interface QueueListener<T>
Queue listener interface.
-
-
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.
-
-