Package 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:
Iterable<T>
public class ReversedIterator<T> extends Object implements 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 Description ReversedIterator(List<T> original)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<T>iterator()static <T> ReversedIterator<T>reverse(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
-
-