/** The Queue interface specifies the methods for a queue data structure. * - The enqueue method adds an element to the "back" of the data structure. * - The dequeue method acts as follows: * - If the queue is empty, an exception is thrown. * - If the queue contains one element, dequeue returns that element, * leaving the queue empty. * - If the queue contains multiple elements, dequeue returns the * element at the "front" of the queue, the one that has been there longest. **/ public interface Queue { /** Returns true if this queue is empty; false otherwise. */ boolean isEmpty(); /** Returns the number of elements currently in the queue. * @returns the number of elements **/ int size(); /** Adds a specified object to the "back" of this queue. * @param item - the object to add to the queue */ void enqueue(T item); /** Removes the element at the "front" of this queue. * @returns the returned element * @throws an exception if the queue is empty **/ T dequeue(); /** Returns the element at the "front" of this queue, without * modifying the queue. * @throws an exception if the queue is empty **/ T peekFront(); }