Package edu.uky.ai.util
Class ArrayIterator<E>
java.lang.Object
edu.uky.ai.util.ArrayIterator<E>
- Type Parameters:
E- the kind of object returned by the iterator
- All Implemented Interfaces:
Iterator<E>
Iterates through all the elements in an array.
- Author:
- Stephen G. Ware
-
Constructor Summary
ConstructorsConstructorDescriptionArrayIterator(E[] array) Constructs a new array iterator for a given array starting at a given index.ArrayIterator(E[] array, int start) Constructs a new array iterator for a given array starting at a given index. -
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, remove
-
Constructor Details
-
ArrayIterator
Constructs a new array iterator for a given array starting at a given index.- Parameters:
array- the array to iterate throughstart- the first element to return
-
ArrayIterator
Constructs a new array iterator for a given array starting at a given index. This constructor is equivalent toArrayIterator(array, 0).- Parameters:
array- the array to iterate through
-
-
Method Details