Class ArrayIterator<T>

java.lang.Object
com.saperion.common.lang.iterator.ArrayIterator<T>
Type Parameters:
T - type of objects to iterate
All Implemented Interfaces:
Iterator<T>

public final class ArrayIterator<T> extends Object implements Iterator<T>

An Iterator that iterates through all elements of an array.

Iterator.remove() is not supported.

Author:
agz
  • Constructor Details

    • ArrayIterator

      public ArrayIterator(T[] array)
      Creates a new ArrayIterator, that iterates through all elements of the specified array.

      The specified array must not be null.

      Parameters:
      array - array to iterate through
  • Method Details