aa.util
Class Queue

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.AbstractSequentialList
              extended byjava.util.LinkedList
                  extended byaa.util.Queue
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable

public class Queue
extends java.util.LinkedList
implements java.io.Serializable

This class defines the queue data type. It is a simple extension of the Linked List class to support syncrhonized method invocation.

History:

Version:
$Date: 2008/01/01 00:24:05 $ $Revision: 1.1 $
Author:
Myeong-Wuk Jang
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.LinkedList
 
Nested classes inherited from class java.util.AbstractList
 
Field Summary
 
Fields inherited from class java.util.LinkedList
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Queue()
          Creates a queue instance.
 
Method Summary
 void insert(java.lang.Object p_object)
          Inserts the sepcified element at the end of this queue.
 void insertAll(Queue p_queue)
          Inserts all of the elements of the specified queue at the end of this queue.
 java.lang.Object remove()
          Removes the first element from this queue, and returns the elemement that was removed from the list.
 
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

Queue

public Queue()
Creates a queue instance.

Method Detail

insert

public void insert(java.lang.Object p_object)
Inserts the sepcified element at the end of this queue.

Parameters:
p_object - the element to be inserted into this queue.

insertAll

public void insertAll(Queue p_queue)
Inserts all of the elements of the specified queue at the end of this queue.

Parameters:
p_queue - all of the elements to be inserted into this queue.

remove

public java.lang.Object remove()
                        throws java.util.NoSuchElementException
Removes the first element from this queue, and returns the elemement that was removed from the list.

Returns:
the element previously at the first position of this queue if it was.
Throws:
java.util.NoSuchElementException - if this list is empty.