Class IteratorUtil
- java.lang.Object
-
- org.abego.treelayout.internal.util.java.util.IteratorUtil
-
public class IteratorUtil extends java.lang.Object
Util (general purpose) methods dealing withIterator
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
IteratorUtil.ReverseIterator<T>
-
Constructor Summary
Constructors Constructor Description IteratorUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.util.Iterator<T>
createReverseIterator(java.util.List<T> list)
Returns anIterator
iterating the given list from the end to the start.
-
-
-
Method Detail
-
createReverseIterator
public static <T> java.util.Iterator<T> createReverseIterator(java.util.List<T> list)
Returns anIterator
iterating the given list from the end to the start.I.e. the iterator does the reverse of the
List.iterator()
.- Type Parameters:
T
- Type of elements in the list- Parameters:
list
-- Returns:
- a reverse
Iterator
of the list
-
-