Package cs2110

Class IndexedSeq.Itr<T>

java.lang.Object
cs2110.IndexedSeq.Itr<T>
All Implemented Interfaces:
Iterator<T>
Enclosing interface:
IndexedSeq<T>

public static class IndexedSeq.Itr<T> extends Object implements Iterator<T>
An iterator over an indexed sequence of elements of type `T`. The sequence should not be structurally modified while an iterator instance is alive.
  • Constructor Details

    • Itr

      Itr(IndexedSeq<T> seq)
      Create an iterator over `seq`.
  • Method Details

    • hasNext

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

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