|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--LQueue
LQueue.java Created: Mon Mar 24 22:24:44 2003
| Constructor Summary | |
LQueue()
Creates a new LQueue instance. |
|
| Method Summary | |
Object |
dequeue()
Removes the Object that is at the front of this
queue, and returns it. |
void |
enqueue(Object obj)
Adds an Object to the rear of this queue. |
Object |
front()
Returns the first element on this queue. |
boolean |
isEmpty()
Determines if this queue is empty. |
String |
toString()
Returns a String representation of this queue,
showing all the elements of it, with the first at the left,
surrounded by parentheses. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public LQueue()
LQueue instance.
| Method Detail |
public boolean isEmpty()
public Object front()
throws NoSuchElementException
Object on the queue.
NoSuchElementException - if this queue is empty.public void enqueue(Object obj)
Object to the rear of this queue.
obj - the Object to be added to this queue.
public Object dequeue()
throws NoSuchElementException
Object that is at the front of this
queue, and returns it.
Object at the front of this queue,
having removed it from this queue.
NoSuchElementException - if this queue is empty.public String toString()
String representation of this queue,
showing all the elements of it, with the first at the left,
surrounded by parentheses.
toString in class ObjectString representation of this queue,
showing all the elements of it, with the first at the left,
surrounded by parentheses.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||