net.sf.okapi.common

## Class ReversedIterator<T>

- java.lang.Object
- - net.sf.okapi.common.ReversedIterator<T>

- Type Parameters:
    `T` - type of the list element
  All Implemented Interfaces:
    java.lang.Iterable<T>

      public class ReversedIterator<T>
      extends java.lang.Object
      implements java.lang.Iterable<T>

  Create a reversed iterator for a list compatible with foreach. Credit: Nat on http://stackoverflow.com/questions/1098117/can-one-do-a-for-each-loop-in-java-in-reverse-orders
  Author:
    HARGRAVEJE

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReversedIterator(java.util.List<T> original)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Iterator<T>` | `iterator()`
    `static <T> ReversedIterator<T>` | `reverse(java.util.List<T> original)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### ReversedIterator

          public ReversedIterator(java.util.List<T> original)

  - ### Method Detail

    - #### iterator

          public java.util.Iterator<T> iterator()

      Specified by:
        `iterator` in interface `java.lang.Iterable<T>`

    - #### reverse

          public static <T> ReversedIterator<T> reverse(java.util.List<T> original)