Package com.jme3.util

Class RingBuffer<T>

java.lang.Object
com.jme3.util.RingBuffer<T>
All Implemented Interfaces:
Iterable<T>

public class RingBuffer<T> extends Object implements Iterable<T>
Ring buffer (fixed size queue) implementation using a circular array (array with wrap-around).
  • Constructor Details

    • RingBuffer

      public RingBuffer(int capacity)
  • Method Details

    • isEmpty

      public boolean isEmpty()
    • size

      public int size()
    • push

      public void push(T item)
    • pop

      public T pop()
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>