All Packages Class Hierarchy This Package Previous Next Index
Interface DataStructures.Queue
- public abstract interface Queue
Protocol for queues.
-
dequeue()
- Return and remove the least recently inserted item
from the queue.
-
enqueue(Object)
- Insert a new item into the queue.
-
getFront()
- Get the least recently inserted item in the queue.
-
isEmpty()
- Test if the queue is logically empty.
-
makeEmpty()
- Make the queue logically empty.
isEmpty
public abstract boolean isEmpty()
- Test if the queue is logically empty.
- Returns:
- true if empty, false otherwise.
getFront
public abstract java.lang.Object getFront() throws Exceptions.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.
dequeue
public abstract java.lang.Object dequeue() throws Exceptions.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.
enqueue
public abstract void enqueue(java.lang.Object X)
- Insert a new item into the queue.
- Parameters:
- X - the item to insert.
makeEmpty
public abstract void makeEmpty()
- Make the queue logically empty.
All Packages Class Hierarchy This Package Previous Next Index