Package net.sf.basedb.util
Class NestedIterator<E>
java.lang.Object
net.sf.basedb.util.NestedIterator<E>
- All Implemented Interfaces:
Iterator<E>
This class implements the
Iterator
interface
for iterating multiple collections as if it was one big collection.- Version:
- 2.0
- Author:
- Nicklas
- Last modified
- $Date: 2015-05-20 14:43:14 +0200 (on, 20 maj 2015) $
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Collection<? extends E>[]
The array to iterate.The current iterator.private int
The index of the next collection to return. -
Constructor Summary
ConstructorDescriptionNestedIterator
(Collection<? extends E>... collections) Create a newArrayIterator
object. -
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
-
Field Details
-
collections
The array to iterate. -
index
private int indexThe index of the next collection to return. -
current
The current iterator.
-
-
Constructor Details
-
NestedIterator
Create a newArrayIterator
object.- Parameters:
collections
- An array of Collection objects.
-
-
Method Details