Class ReverseArrayIterator<T>
- java.lang.Object
-
- com.saperion.common.lang.iterator.ReverseArrayIterator<T>
-
- Type Parameters:
T- type of objects to iterate
- All Implemented Interfaces:
java.util.Iterator<T>
public final class ReverseArrayIterator<T> extends java.lang.Object implements java.util.Iterator<T>An
Iteratorthat 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
Constructors Constructor Description ReverseArrayIterator(T[] array)Creates a newReverseArrayIterator, that iterates through all elements of the specified array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Tnext()voidremove()java.lang.StringtoString()
-
-
-
Constructor Detail
-
ReverseArrayIterator
public ReverseArrayIterator(T[] array)
Creates a newReverseArrayIterator, that iterates through all elements of the specified array. The specified array must not benull.- Parameters:
array- array to iterate through
-
-