Class ArrayListIterator<E>

java.lang.Object
ch.nolix.base.container.arraylist.ArrayListIterator<E>
Type Parameters:
E - is the type of the elements of the parent array of a ArrayListIterator.
All Implemented Interfaces:
CopyableIterator<E>, Copyable<CopyableIterator<E>>, Iterator<E>

public final class ArrayListIterator<E> extends Object implements CopyableIterator<E>
Author:
Silvan Wyss
  • Method Details

    • forArrayAndMaxNextIndex

      public static <T> ArrayListIterator<T> forArrayAndMaxNextIndex(T[] array, int maxNextIndex)
    • forArrayAndStartIndexAndMaxNextIndex

      public static <T> ArrayListIterator<T> forArrayAndStartIndexAndMaxNextIndex(T[] array, int startIndex, int maxIndex)
    • getCopy

      public CopyableIterator<E> getCopy()
      Specified by:
      getCopy in interface Copyable<E>
      Returns:
      a new copy of the current Copyable.
    • hasNext

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

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