Class IterableUtil
- java.lang.Object
-
- org.abego.treelayout.internal.util.java.lang.IterableUtil
-
public class IterableUtil extends java.lang.Object
Util (general purpose) methods dealing withIterable
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
IterableUtil.ReverseIterable<T>
-
Constructor Summary
Constructors Constructor Description IterableUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.lang.Iterable<T>
createReverseIterable(java.util.List<T> list)
Returns anIterable
with an iterator iterating the given list from the end to the start.
-
-
-
Method Detail
-
createReverseIterable
public static <T> java.lang.Iterable<T> createReverseIterable(java.util.List<T> list)
Returns anIterable
with an iterator 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
Iterable
of the list
-
-