Copyright 2002 by aragost

com.aragost.util
Class FifoQueue

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.ArrayList
                    |
                    +--com.aragost.util.FifoQueue
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, Queue, java.util.RandomAccess, java.io.Serializable

public class FifoQueue
extends java.util.ArrayList
implements Queue

A FIFO implementation (or stack implementation)

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
FifoQueue()
           
 
Method Summary
 java.lang.Object peek()
          Return the next Object from the queue, that is the Object that will be returned by the remove method.
 java.lang.Object remove()
          Remove the next Object from the queue.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.aragost.util.Queue
add
 
Methods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Constructor Detail

FifoQueue

public FifoQueue()
Method Detail

peek

public java.lang.Object peek()
Return the next Object from the queue, that is the Object that will be returned by the remove method. This method is optional, if it is not supported an UnsupportedOperationException should be thrown.

Specified by:
peek in interface Queue

remove

public java.lang.Object remove()
Remove the next Object from the queue. If the queue is empty then throw an NoSuchElementException.

Specified by:
remove in interface Queue
Returns:
Return the Object removed.

Copyright 2002 by aragost