|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopenlist.Queue<Type>
public class Queue<Type>
A Queue is a first-in, first-out repository.
| Field Summary | |
|---|---|
private OpenList<Type> |
in
Two lists are used. |
private OpenList<Type> |
out
|
| Constructor Summary | |
|---|---|
Queue()
Create an empty queue. |
|
| Method Summary | |
|---|---|
Type |
dequeue()
Dequeue an item from the Queue. |
void |
enqueue(Type item)
Enqueue one item to the Queue. |
boolean |
isEmpty()
Indicate whether or not the Queue is empty |
boolean |
nonEmpty()
Indicate whether or not the Queue is non-empty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private OpenList<Type> in
private OpenList<Type> out
| Constructor Detail |
|---|
public Queue()
| Method Detail |
|---|
public void enqueue(Type item)
item - the item to be enqueuedpublic Type dequeue()
public boolean isEmpty()
public boolean nonEmpty()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||