Package algs13

Class Queue<T>

java.lang.Object
algs13.Queue<T>
All Implemented Interfaces:
Iterable<T>

public class Queue<T> extends Object implements Iterable<T>
The Queue class represents a first-in-first-out (FIFO) queue of generic items. It supports the usual enqueue and dequeue operations, along with methods for peeking at the top item, testing if the queue is empty, and iterating through the items in FIFO order.

All queue operations except iteration are constant time.

For additional documentation, see Section 1.3 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.