Class ArrayIterator<E>

  • All Implemented Interfaces:
    Iterator<E>

    public class ArrayIterator<E>
    extends Object
    implements Iterator<E>
    This class implements the Iterator interface for an array of objects.
    Version:
    2.0
    Author:
    Nicklas
    • Field Detail

      • array

        private final E[] array
        The array to iterate.
      • index

        private int index
        The index of the next element to return.
    • Constructor Detail

      • ArrayIterator

        public ArrayIterator​(E[] array)
        Create a new ArrayIterator object.
        Parameters:
        array - Array to set.