Package net.solarnetwork.util
Class UnionIterator<E>
java.lang.Object
net.solarnetwork.util.UnionIterator<E>
- Type Parameters:
E- the element type
- All Implemented Interfaces:
Iterator<E>
Joins multiple Iterator instances into a single Iterator.
- Version:
- 1.1
- Author:
- matt
-
Constructor Summary
ConstructorsConstructorDescriptionUnionIterator(Collection<Iterator<E>> iterators) Construct from a collection of iterators. -
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
-
Constructor Details
-
UnionIterator
Construct from a collection of iterators.- Parameters:
iterators- the iterators to merge
-
-
Method Details
-
hasNext
public boolean hasNext() -
finishedIterator
Callback when iteration has finished on a delegate interator.This can be used by extending classes to clean up resources on the delegate iterators.
- Parameters:
itr- the delegate iterator that has finished
-
next
-
remove
public void remove()
-