Class CircularListQueue

  • All Implemented Interfaces:
    Queue, java.lang.Cloneable

    public class CircularListQueue
    extends java.lang.Object
    implements Queue, java.lang.Cloneable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      Returns a shallow copy.
      java.lang.Object dequeue()  
      void enqueue​(java.lang.Object obj)  
      boolean hasMoreElements()  
      java.lang.Object peek()  
      int size()  
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CircularListQueue

        public CircularListQueue()
    • Method Detail

      • size

        public int size()
        Specified by:
        size in interface Queue
      • hasMoreElements

        public boolean hasMoreElements()
        Specified by:
        hasMoreElements in interface Queue
      • enqueue

        public void enqueue​(java.lang.Object obj)
        Specified by:
        enqueue in interface Queue
      • peek

        public java.lang.Object peek()
        Specified by:
        peek in interface Queue
      • dequeue

        public java.lang.Object dequeue()
        Specified by:
        dequeue in interface Queue
      • clone

        public java.lang.Object clone()
        Returns a shallow copy. The queue is cloned, but not the elements within it.
        Specified by:
        clone in interface Queue
        Overrides:
        clone in class java.lang.Object