public class IteratorCollection extends Object
Modifier and Type | Method and Description |
---|---|
static <T> List<T> |
iteratorToList(Iterator<? extends T> it)
Answer the elements of the given iterator as a list, in the order that they
arrived from the iterator.
|
static <T> Set<T> |
iteratorToSet(Iterator<? extends T> i)
Answer the elements of the given iterator as a set.
|
public static <T> Set<T> iteratorToSet(Iterator<? extends T> i)
i
- the iterator to convertpublic static <T> List<T> iteratorToList(Iterator<? extends T> it)
it
- the iterator to convertit
, in orderCopyright ? 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP