Please send questions to
st10@humboldt.edu .
/* Cs132Queue.java 1.0 (interface) */
/* by Sharon Tuttle */
/* last modified: 3-11-03 */
public interface Cs132Queue
{
// Purpose: returns true iff queue has no elements
public boolean isEmpty();
// Purpose: add given data newElement to back of queue
public void enqueue(Object newElement);
// Purpose: IF queue is not empty, REMOVE element from front
// of queue and return it
// If it IS empty, throw a QueueEmptyException.
public Object dequeue() throws QueueEmptyException;
// Purpose: IF queue is not empty, return (NONDESTRUCTIVELY) the
// front element of the queue.
// If it IS empty, throw a QueueEmptyException
public Object getFront() throws QueueEmptyException;
}