Class ReverseArrayIterator<T>
java.lang.Object
com.saperion.common.lang.iterator.ReverseArrayIterator<T>
- Type Parameters:
T
- type of objects to iterate
- All Implemented Interfaces:
Iterator<T>
An Iterator
that iterates through all elements of an array - in reversed order i.e. starting with the last
element.
Iterator.remove()
is not supported.
- Author:
- jsc
-
Constructor Summary
ConstructorsConstructorDescriptionReverseArrayIterator
(T[] array) Creates a newReverseArrayIterator
, that iterates through all elements of the specified array. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
ReverseArrayIterator
Creates a newReverseArrayIterator
, that iterates through all elements of the specified array. The specified array must not benull
.- Parameters:
array
- array to iterate through
-
-
Method Details