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 orderLicenced under the Apache License, Version 2.0