Class FIFOQueue


  • public final class FIFOQueue
    extends Object
    A FIFO queue of objects, implemented as a circular buffer. NOTE: elements stored in the buffer should be non-null; this is not checked for performance reasons.
    Author:
    Manu Sridharan
    • Constructor Detail

      • FIFOQueue

        public FIFOQueue​(int initialSize_)
        Parameters:
        initialSize_ - the initial size of the queue
      • FIFOQueue

        public FIFOQueue()
    • Method Detail

      • push

        public boolean push​(Object obj_)
      • add

        public boolean add​(Object obj_)
        add an element to the bottom of the queue
      • remove

        public Object remove()
        remove the top element from the buffer
      • isEmpty

        public boolean isEmpty()
      • clear

        public void clear()