All Packages Class Hierarchy This Package Previous Next Index
Class DataStructures.QueueLi
java.lang.Object
|
+----DataStructures.QueueLi
- public class QueueLi
- extends java.lang.Object
- implements DataStructures.Queue
List-based implementation of the queue.
-
QueueLi()
- Construct the queue.
-
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.
QueueLi
public QueueLi()
- Construct the queue.
isEmpty
public boolean isEmpty()
- Test if the queue is logically empty.
- Returns:
- true if empty, false otherwise.
makeEmpty
public void makeEmpty()
- Make the queue logically empty.
getFront
public 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 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 void enqueue(java.lang.Object x)
- Insert a new item into the queue.
- Parameters:
- x - the item to insert.
All Packages Class Hierarchy This Package Previous Next Index