Package org.basex.util
Class ArrayIterator<E>
- java.lang.Object
-
- org.basex.util.ArrayIterator<E>
-
- Type Parameters:
E
- generic object type
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 Summary
Constructors Constructor Description ArrayIterator(Object[] array, int end)
Constructor.ArrayIterator(Object[] array, int start, int end)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Iterator<E>
iterator()
E
next()
void
remove()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
ArrayIterator
public ArrayIterator(Object[] array, int end)
Constructor.- Parameters:
array
- array to iterate throughend
- index + 1 of last object to return
-
ArrayIterator
public ArrayIterator(Object[] array, int start, int end)
Constructor.- Parameters:
array
- array to iterate throughstart
- index of first object to returnend
- index + 1 of last object to return
-
-