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