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>

public final class ReverseArrayIterator<T> extends Object implements 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 Details

    • ReverseArrayIterator

      public ReverseArrayIterator(T[] array)
      Creates a new ReverseArrayIterator, that iterates through all elements of the specified array.

      The specified array must not be null.

      Parameters:
      array - array to iterate through
  • Method Details