Package proguard.util

Class CircularIntBuffer


  • public class CircularIntBuffer
    extends java.lang.Object
    A circular buffer over the primitive integer type.
    • Constructor Summary

      Constructors 
      Constructor Description
      CircularIntBuffer​(int maxSize)
      Create a new CircularIntBuffer that can grow to a given maxSize.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int peek()
      Get the head value.
      int peek​(int offset)
      Get the element at an offset of the head.
      void push​(int value)
      Push a value into the buffer overriding the oldest element when exceeding max size.
      int size()
      Get current size of the buffer.
      • Methods inherited from class java.lang.Object

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

      • CircularIntBuffer

        public CircularIntBuffer​(int maxSize)
        Create a new CircularIntBuffer that can grow to a given maxSize.
    • Method Detail

      • push

        public void push​(int value)
        Push a value into the buffer overriding the oldest element when exceeding max size.
      • peek

        public int peek​(int offset)
        Get the element at an offset of the head.
      • peek

        public int peek()
        Get the head value.
      • size

        public int size()
        Get current size of the buffer.