|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweiss.nonstandard.ListQueue<AnyType>
public class ListQueue<AnyType>
List-based implementation of the queue.
Constructor Summary | |
---|---|
ListQueue()
Construct the queue. |
Method Summary | |
---|---|
AnyType |
dequeue()
Return and remove the least recently inserted item from the queue. |
void |
enqueue(AnyType x)
Insert a new item into the queue. |
AnyType |
getFront()
Get the least recently inserted item in the queue. |
boolean |
isEmpty()
Test if the queue is logically empty. |
void |
makeEmpty()
Make the queue logically empty. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListQueue()
Method Detail |
---|
public boolean isEmpty()
isEmpty
in interface Queue<AnyType>
public void enqueue(AnyType x)
enqueue
in interface Queue<AnyType>
x
- the item to insert.public AnyType dequeue()
dequeue
in interface Queue<AnyType>
UnderflowException
- if the queue is empty.public AnyType getFront()
getFront
in interface Queue<AnyType>
UnderflowException
- if the queue is empty.public void makeEmpty()
makeEmpty
in interface Queue<AnyType>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |