Class ArrayIterator<E>

  • All Implemented Interfaces:
    Iterator<E>

    public final class ArrayIterator<E>
    extends Object
    implements Iterator<E>
    An Iterator over an array.
    Author:
    Philipp Meinen
    • Constructor Detail

      • ArrayIterator

        public ArrayIterator​(E[] data)
        Creates an array iterator which will iterate over the provided array.
        Parameters:
        data - the data to iterate over, may be null or empty.
    • Method Detail

      • 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>