Package org.codehaus.groovy.util
Class ArrayIterator<T>
java.lang.Object
org.codehaus.groovy.util.ArrayIterator<T>
- All Implemented Interfaces:
Iterator<T>
Allows an array to be used where an Iterator is expected.
The iterator is backed by the original array and iterated in index order.
-
Constructor Summary
ConstructorsConstructorDescriptionArrayIterator(T[] array) Creates an iterator that traverses the supplied array in index order. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
ArrayIterator
Creates an iterator that traverses the supplied array in index order.- Parameters:
array- the backing array to iterate
-
-
Method Details