Class LazyCollection.SubListListIterator

All Implemented Interfaces:
Iterator<E>, ListIterator<E>
Enclosing class:
LazyCollection<E>

public class LazyCollection.SubListListIterator extends LazyCollection.ReadOnlyListIterator<E>
Iterator that iterates over a subrange of the underlying LazyList's contents.
  • Field Details

    • fromIndex

      protected final int fromIndex
    • toIndex

      protected final int toIndex
    • i

      protected int i
  • Constructor Details

    • SubListListIterator

      public SubListListIterator(int fromIndex, int toIndex)
      Creates a LazyCollection<E>.SubListListIterator for the range fromIndex, including, to toIndex, excluding.
      Parameters:
      fromIndex - the starting index. inclusive
      toIndex - the ending index, exclusive
    • SubListListIterator

      public SubListListIterator(int fromIndex, int toIndex, int index)
      Creates a LazyCollection<E>.SubListListIterator for the range fromIndex, including, to toIndex, excluding.
      Parameters:
      fromIndex - the starting index, inclusive
      toIndex - the ending index, exclusive
      index - the iterator starting index.
  • Method Details

    • hasNext

      public boolean hasNext()
    • next

      public E next()
    • nextIndex

      public int nextIndex()
    • hasPrevious

      public boolean hasPrevious()
    • previous

      public E previous()
    • previousIndex

      public int previousIndex()