|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.hawaii.ics.yucheng.LinkedListQueue<T>
class LinkedListQueue<T>
Implementation of a generic linked list queue. This class exists only to support the JRE 1.5.10, which is currently installed on uhunix2.its.hawaii.edu.
Nested Class Summary | |
---|---|
private static class |
LinkedListQueue.Node<T>
A node class for the generic queue. |
Field Summary | |
---|---|
private LinkedListQueue.Node<T> |
myHead
|
private LinkedListQueue.Node<T> |
myTail
|
Constructor Summary | |
---|---|
LinkedListQueue()
|
Method Summary | |
---|---|
boolean |
isEmpty()
Returns true if the collection contains no elements. |
T |
pop()
Retrieves and removes the head of this queue. |
void |
push(T e)
Inserts the specified element into this queue. |
java.lang.String |
toString()
Returns the string representation of the class data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private LinkedListQueue.Node<T> myHead
private LinkedListQueue.Node<T> myTail
Constructor Detail |
---|
LinkedListQueue()
Method Detail |
---|
public boolean isEmpty()
public T pop()
java.util.NoSuchElementException
- if this queue is emptypublic void push(T e)
e
- the element to addpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |