com.mhhe.clrs2e
Interface Queue

All Known Implementing Classes:
QueueArray

public interface Queue

Interface for a queue.


Method Summary
 java.lang.Object dequeue()
          Returns and removes the object at the head of the queue.
 void enqueue(java.lang.Object x)
          Adds an object to the tail of the queue.
 boolean isEmpty()
          Returns true if the queue is empty, false otherwise.
 

Method Detail

enqueue

public void enqueue(java.lang.Object x)
Adds an object to the tail of the queue.

Parameters:
x - Object to be enqueued.

dequeue

public java.lang.Object dequeue()
Returns and removes the object at the head of the queue.


isEmpty

public boolean isEmpty()
Returns true if the queue is empty, false otherwise.