Package io.vavr.collection
Interface IteratorModule
-
interface IteratorModule
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IteratorModule.BigDecimalHelper
static class
IteratorModule.CachedIterator<T>
static class
IteratorModule.ConcatIterator<T>
static class
IteratorModule.DistinctIterator<T,U>
static class
IteratorModule.EmptyIterator
static class
IteratorModule.GroupedIterator<T>
-
-
-
Method Detail
-
duplicate
static <T> Tuple2<Iterator<T>,Iterator<T>> duplicate(Iterator<T> iterator)
Creates two new iterators that both iterates over the same elements as this iterator and in the same order. The duplicate iterators are considered equal if they are positioned at the same element.Given that most methods on iterators will make the original iterator unfit for further use, this methods provides a reliable way of calling multiple such methods on an iterator.
- Returns:
- a pair of iterators
-
-