Class ArrayIterator<E>

  • Type Parameters:
    E - generic object type
    All Implemented Interfaces:
    Iterable<E>, Iterator<E>

    public final class ArrayIterator<E>
    extends Object
    implements Iterator<E>, Iterable<E>
    This class is used to iterate over the elements of an array, or parts of it. null references are skipped. An iterator cannot be used twice.
    Author:
    BaseX Team 2005-23, BSD License, Christian Gruen
    • Constructor Detail

      • ArrayIterator

        public ArrayIterator​(Object[] array,
                             int end)
        Constructor.
        Parameters:
        array - array to iterate through
        end - index + 1 of last object to return
      • ArrayIterator

        public ArrayIterator​(Object[] array,
                             int start,
                             int end)
        Constructor.
        Parameters:
        array - array to iterate through
        start - index of first object to return
        end - index + 1 of last object to return