Class RingBuffer.FwdItr

Object
FwdItr
All Implemented Interfaces:
Iterator<T>
Direct Known Subclasses:
RingBuffer.LstItr
Enclosing class:
RingBuffer<T>

private class RingBuffer.FwdItr extends Object implements Iterator<T>
Iterates forward over all elements in this buffer starting with the oldest entry.
  • Field Details

    • cursor

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

    • FwdItr

      public FwdItr()
      Creates a new Iterator over all elements in this buffer starting with the oldest 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>