package DataStructures; /** * A first-in-first-out (FIFO) queue of objects. * @param the type of elements held in this queue * @author Peter Williams */ public interface Queue { /** * Indicates the status of the queue. * @return true if the queue is empty. */ public boolean isEmpty(); /** * Attaches an item to the queue. * @param item the item of type E to be queued. */ public void enqueue(E item); /** * Detaches an item from the queue. * @return the item least recently queued. * @exception NoSuchElementException if the queue is empty. */ public E dequeue(); }