Class IterableUtil
java.lang.Object
org.abego.treelayout.internal.util.java.lang.IterableUtil
Util (general purpose) methods dealing with
Iterable
.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Iterable
<T> createReverseIterable
(List<T> list) Returns anIterable
with an iterator iterating the given list from the end to the start.
-
Constructor Details
-
IterableUtil
public IterableUtil()
-
-
Method Details
-
createReverseIterable
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
-