Class RingBuffer.BckItr

Object
BckItr
All Implemented Interfaces:
Iterator<T>
Enclosing class:
RingBuffer<T>

private class RingBuffer.BckItr extends Object implements Iterator<T>
Iterates backwards over all elements in this buffer starting with the most recent entry.
  • Field Details

    • cursor

      int cursor
      Index of current element in Iterator.
  • Constructor Details

    • BckItr

      public BckItr()
      Creates a new Iterator over all elements in this buffer starting with the most recent entry.
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • next

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