1: /**
2: An interface for the ADT queue.
3: @author Frank M. Carrano
4: @author Timothy M. Henry
5: @version 4.0
6: */
7: public interface QueueInterface<T>
8: {
9: /** Adds a new entry to the back of this queue.
10: @param newEntry An object to be added. */
11: public void enqueue(T newEntry);
12:
13: /** Removes and returns the entry at the front of this queue.
14: @return The object at the front of the queue.
15: @throws EmptyQueueException if the queue is empty before the operation. */
16: public T dequeue();
17:
18: /** Retrieves the entry at the front of this queue.
19: @return The object at the front of the queue.
20: @throws EmptyQueueException if the queue is empty. */
21: public T getFront();
22:
23: /** Detects whether this queue is empty.
24: @return True if the queue is empty, or false otherwise. */
25: public boolean isEmpty();
26:
27: /** Removes all entries from this queue. */
28: public void clear();
29: } // end QueueInterface