Package ca.phon.util
Class Queue<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<E>
ca.phon.util.Queue<E>
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<E>
,Collection<E>
,List<E>
,RandomAccess
Basic (FIFO) Queue class based on java.util.Vector.
Class is threadsafe.
- See Also:
-
Field Summary
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
-
Method Summary
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Constructor Details
-
Queue
public Queue()Constructors from superclass -
Queue
-
Queue
public Queue(int arg0, int arg1) -
Queue
public Queue(int arg0)
-
-
Method Details
-
queue
Queues an object.- Parameters:
obj
- the object to add to the queue
-
dequeue
De-queues an object. This method returns the next object to be returned.- Returns:
- Object the next object in the queue
- Throws:
EmptyQueueException
-
peek
Peeks at the next object in the queue, without removing it.- Returns:
- Object the next element in the queue
- Throws:
EmptyQueueException
-