org.abego.treelayout.internal.util.java.lang
Class IterableUtil

java.lang.Object
  extended by org.abego.treelayout.internal.util.java.lang.IterableUtil

public class IterableUtil
extends Object

Util (general purpose) methods dealing with Iterable.

Author:
Udo Borkowski (ub@abego.org)

Constructor Summary
IterableUtil()
           
 
Method Summary
static
<T> Iterable<T>
createReverseIterable(List<T> list)
          Returns an Iterable with an iterator iterating the given list from the end to the start.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterableUtil

public IterableUtil()
Method Detail

createReverseIterable

public static <T> Iterable<T> createReverseIterable(List<T> list)
Returns an Iterable 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 -
Parameters:
list -
Returns:
a reverse Iterable of the list


Copyright © 2011 abego Software GmbH, Germany. All Rights Reserved.