public final class Iterators extends Object
Modifier and Type | Method and Description |
---|---|
static int |
count(CloseableIterator<?> it) |
static int |
count(CloseableIteratorWithoutException<?> it) |
static <T> CloseableIteratorWithoutException<T> |
emptyIterator()
Construct and return an empty iterator.
|
static <E> CloseableIteratorWithoutException<E> |
singletonIterator(E e) |
static <T extends Comparable<T>> |
sort(CloseableIterator<T> it)
Return an iterator over sorted elements from the specified iterator.
|
static <T extends Comparable<T>> |
sort(Iterator<T> it)
Return an iterator over sorted elements from the specified iterator.
|
static <T> List<T> |
toList(CloseableIterator<T> it) |
static <T> List<T> |
toList(CloseableIteratorWithoutException<T> it) |
static <T> Set<T> |
toSet(CloseableIterator<T> it) |
static <T> Set<T> |
toSet(CloseableIteratorWithoutException<T> it) |
static <T extends Comparable<T>> |
uniq(CloseableIterator<T> it)
Remove all equals elements.
|
static <T extends Comparable<T>> |
uniq(Iterator<T> it)
Remove all equals elements.
|
static <T> CloseableIterator<T> |
uniqLocaly(CloseableIterator<T> it)
Remove adjacent equals elements.
|
public static <T> CloseableIteratorWithoutException<T> emptyIterator()
CloseableIteratorWithoutException
public static <E> CloseableIteratorWithoutException<E> singletonIterator(E e)
public static int count(CloseableIterator<?> it) throws IteratorException
IteratorException
public static int count(CloseableIteratorWithoutException<?> it)
public static <T> CloseableIterator<T> uniqLocaly(CloseableIterator<T> it)
it
- public static <T extends Comparable<T>> CloseableIterator<T> sort(CloseableIterator<T> it) throws IteratorException
it
- IteratorException
public static <T extends Comparable<T>> Iterator<T> sort(Iterator<T> it)
it
- public static <T extends Comparable<T>> CloseableIterator<T> uniq(CloseableIterator<T> it) throws IteratorException
it
- IteratorException
public static <T extends Comparable<T>> Iterator<T> uniq(Iterator<T> it)
it
- public static <T> List<T> toList(CloseableIterator<T> it) throws IteratorException
it
- IteratorException
public static <T> List<T> toList(CloseableIteratorWithoutException<T> it)
it
- public static <T> Set<T> toSet(CloseableIterator<T> it) throws IteratorException
it
- IteratorException
public static <T> Set<T> toSet(CloseableIteratorWithoutException<T> it)
it
- Copyright © 2014–2018 GraphIK (INRIA - LIRMM). All rights reserved.