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.-
Field Summary
FieldsModifier and TypeFieldDescriptionThe current iterator (fromitorOfItors) that is being iterated over.The iterators that this object merges. -
Constructor Summary
ConstructorsConstructorDescriptionMergedIterator(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, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
itorOfItors
The iterators that this object merges. -
current
The current iterator (fromitorOfItors) that is being iterated over.
-
-
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)
-