Package org.plumelib.util
Class CollectionsPlume.MergedIterator<T>
java.lang.Object
org.plumelib.util.CollectionsPlume.MergedIterator<T>
- Type Parameters:
T
- the type of elements of the iterator
- All Implemented Interfaces:
Iterator<T>
- Enclosing class:
- CollectionsPlume
An Iterator that returns the elements in each of its argument Iterators, in turn. The argument
is an Iterator of Iterators. Like
CollectionsPlume.MergedIterator2
, but generalized to arbitrary number
of iterators.-
Constructor Summary
ConstructorDescriptionMergedIterator
(Iterator<Iterator<T>> itorOfItors) Create an iterator that returns the elements of the given iterators, in turn. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
MergedIterator
Create an iterator that returns the elements of the given iterators, in turn.- Parameters:
itorOfItors
- an iterator whose elements are iterators; this MergedIterator will merge them all
-
-
Method Details
-
hasNext
public boolean hasNext(@GuardSatisfied CollectionsPlume.MergedIterator<T> this) -
next
-
remove
public void remove(@GuardSatisfied CollectionsPlume.MergedIterator<T> this)
-