Class LLQueue

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.AbstractSequentialList
                    |
                    +--java.util.LinkedList
                          |
                          +--LLQueue
All Implemented Interfaces:
Cloneable, Collection, List, Serializable

public class LLQueue
extends LinkedList

LLQueue.java
A queue implementation that extends java.util.LinkedList

Created: Tue Mar 25 13:24:26 2003

Author:
Stuart C. Shapiro
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
LLQueue()
          Creates a new LLQueue 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.
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, remove, remove, removeFirst, removeLast, set, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

LLQueue

public LLQueue()
Creates a new LLQueue instance.

Method Detail

front

public Object front()
             throws NoSuchElementException
Returns the first element on this queue.

Returns:
the first Object on the queue.
Throws:
NoSuchElementException - if this queue is empty.

enqueue

public void enqueue(Object obj)
Adds an Object to the rear of this queue.

Parameters:
obj - the Object to be added to this queue.

dequeue

public Object dequeue()
               throws NoSuchElementException
Removes the Object that is at the front of this queue, and returns it.

Returns:
the Object at the front of this queue, having removed it from this queue.
Throws:
NoSuchElementException - if this queue is empty.