Package ca.phon.util

Class Queue<E>

All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess

public class Queue<E> extends Vector<E>
Basic (FIFO) Queue class based on java.util.Vector. Class is threadsafe.
See Also:
  • Constructor Details

    • Queue

      public Queue()
      Constructors from superclass
    • Queue

      public Queue(Collection<E> arg0)
    • Queue

      public Queue(int arg0, int arg1)
    • Queue

      public Queue(int arg0)
  • Method Details

    • queue

      public void queue(E obj)
      Queues an object.
      Parameters:
      obj - the object to add to the queue
    • dequeue

      public E dequeue() throws EmptyQueueException
      De-queues an object. This method returns the next object to be returned.
      Returns:
      Object the next object in the queue
      Throws:
      EmptyQueueException
    • peek

      public E peek() throws EmptyQueueException
      Peeks at the next object in the queue, without removing it.
      Returns:
      Object the next element in the queue
      Throws:
      EmptyQueueException