|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.colorado.collections.LinkedQueue<E>
public class LinkedQueue<E>
A LinkedQueue<E> is a queue of references to E objects.
Int.MAX_VALUE items, size is wrong.
ArrayQueue| Constructor Summary | |
|---|---|
LinkedQueue()
Initialize an empty queue. |
|
| Method Summary | |
|---|---|
void |
add(E item)
Put a new a new item in this queue. |
LinkedQueue<E> |
clone()
Generate a copy of this queue. |
boolean |
isEmpty()
Determine whether this queue is empty. |
E |
remove()
Get the front item, removing it from this queue. |
int |
size()
Accessor method to determine the number of items in this queue. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LinkedQueue()
- - none
| Method Detail |
|---|
public void add(E item)
item - the item to be pushed onto this queue
java.lang.OutOfMemoryError - Indicates insufficient memory for increasing the queue's capacity.
Integer.MAX_VALUE will cause the queue to fail with an
arithmetic overflow.public LinkedQueue<E> clone()
clone in class java.lang.Object- - none
LinkedQueue before it can be used.
java.lang.OutOfMemoryError - Indicates insufficient memory for creating the clone.public boolean isEmpty()
- - none
true if this queue is empty;
false otherwise.public E remove()
- - none
java.util.NoSuchElementException - Indicates that this queue is empty.public int size()
- - none
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||