org.apache.jetspeed.util
Class FIFOQueue

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.Vector
              extended byorg.apache.jetspeed.util.FIFOQueue
All Implemented Interfaces:
Cloneable, Collection, List, org.apache.jetspeed.util.Queue, RandomAccess, Serializable

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 188405 2005-03-19 12:47:14Z sgala $
Author:
Rapha?l Luta
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.AbstractList
 
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-2005 Apache Software Foundation. All Rights Reserved.