Class CircularIntBuffer4

  • All Implemented Interfaces:
    Iterable4<java.lang.Integer>

    public class CircularIntBuffer4
    extends java.lang.Object
    implements Iterable4<java.lang.Integer>
    A fixed size double ended queue with O(1) complexity for addFirst, removeFirst and removeLast operations.
    • Constructor Detail

      • CircularIntBuffer4

        public CircularIntBuffer4​(int size)
    • Method Detail

      • size

        public int size()
      • addFirst

        public void addFirst​(int value)
      • removeLast

        public int removeLast()
      • isEmpty

        public boolean isEmpty()
      • isFull

        public boolean isFull()
      • removeFirst

        public int removeFirst()
      • remove

        public boolean remove​(int value)
      • contains

        public boolean contains​(int value)