Class ArrayIterator<E>

java.lang.Object
com.strobel.collections.ArrayIterator<E>
All Implemented Interfaces:
Iterator<E>

public final class ArrayIterator<E> extends Object implements Iterator<E>
  • Field Details

    • _elements

      private final E[] _elements
    • _index

      private int _index
  • Constructor Details

    • ArrayIterator

      public ArrayIterator(E[] elements)
  • Method Details

    • hasNext

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

      public E next()
      Specified by:
      next in interface Iterator<E>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<E>