Package org.plumelib.util
Class CollectionsPlume.MergedIterator2<T>
java.lang.Object
org.plumelib.util.CollectionsPlume.MergedIterator2<T>
- Type Parameters:
T- the type of elements of the iterator
- All Implemented Interfaces:
Iterator<T>
- Enclosing class:
- CollectionsPlume
An Iterator that returns first the elements returned by its first argument, then the elements
returned by its second argument. Like
CollectionsPlume.MergedIterator, but specialized for the case of
two arguments.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMergedIterator2(Iterator<T> itor1, Iterator<T> itor2) Create an iterator that returns the elements ofitor1then those ofitor2. -
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
-
itor1
The first of the two iterators that this object merges. -
itor2
The second of the two iterators that this object merges.
-
-
Constructor Details
-
MergedIterator2
Create an iterator that returns the elements ofitor1then those ofitor2.- Parameters:
itor1- an Iteratoritor2- another Iterator
-
-
Method Details
-
hasNext
public boolean hasNext(@GuardSatisfied CollectionsPlume.MergedIterator2<T> this) -
next
-
remove
public void remove(@GuardSatisfied CollectionsPlume.MergedIterator2<T> this)
-