All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface DataStructures.Queue

public interface Queue
Protocol for queues.


Method Index

 o dequeue()
Return and remove the least recently inserted item from the queue.
 o enqueue(Object)
Insert a new item into the queue.
 o getFront()
Get the least recently inserted item in the queue.
 o isEmpty()
Test if the queue is logically empty.
 o makeEmpty()
Make the queue logically empty.

Methods

 o isEmpty
  public abstract boolean isEmpty()
Test if the queue is logically empty.

Returns:
true if empty, false otherwise.
 o getFront
  public abstract Object getFront() throws Underflow
Get the least recently inserted item in the queue. Does not alter the queue.

Returns:
the least recently inserted item in the queue.
Throws: Underflow
if the queue is empty.
 o dequeue
  public abstract Object dequeue() throws Underflow
Return and remove the least recently inserted item from the queue.

Returns:
the least recently inserted item in the queue.
Throws: Underflow
if the queue is empty.
 o enqueue
  public abstract void enqueue(Object X)
Insert a new item into the queue.

Parameters:
X - the item to insert.
 o makeEmpty
  public abstract void makeEmpty()
Make the queue logically empty.


All Packages  Class Hierarchy  This Package  Previous  Next  Index