org.apache.jetspeed.util
Class FIFOQueue

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by org.apache.jetspeed.util.FIFOQueue
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess, org.apache.jetspeed.util.Queue

public class FIFOQueue
extends Vector
implements org.apache.jetspeed.util.Queue

Simple FIFO implementation of Queue interface extending Vector as storage backend.

Version:
$Id: FIFOQueue.java 516448 2007-03-09 16:25:47Z ate $
Author:
Raphaël Luta
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
FIFOQueue()
           
 
Method Summary
 Object peek()
          Gets the first object in the queue without removing it from the queue
 Object pop()
          Gets the first object in the queue and remove it from the queue
 void push(Object obj)
          Adds a new object into the queue
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

FIFOQueue

public FIFOQueue()
Method Detail

push

public void push(Object obj)
Adds a new object into the queue

Specified by:
push in interface org.apache.jetspeed.util.Queue

pop

public Object pop()
Gets the first object in the queue and remove it from the queue

Specified by:
pop in interface org.apache.jetspeed.util.Queue

peek

public Object peek()
Gets the first object in the queue without removing it from the queue

Specified by:
peek in interface org.apache.jetspeed.util.Queue


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.