|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.core.util.CollectionUtils
public class CollectionUtils
Yet another utility class to help work with Collections. This class contains helper methods not found in any of the Collection utilities rice currently uses.
Method Summary | ||
---|---|---|
static
|
toIterable(Enumeration<T> e)
Creates an Iterable view of a Enumeration. |
|
static
|
toIterable(Iterator<T> i)
Creates an Iterable view of a Iterator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> Iterable<T> toIterable(Iterator<T> i)
Iterator<String> i ...
for(String s : CollectionUtils.toIterable(i)) [
System.out.println("i love for each " + s);
}
T
- the type of the Iterablei
- the iterator to wrap
public static <T> Iterable<T> toIterable(Enumeration<T> e)
Enumeration<String> e ...
for(String s : CollectionUtils.toIterable(e)) [
System.out.println("i love for each " + s);
}
T
- the type of the Iterablee
- the enumeration to wrap
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |