|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.NestedIterator<E>
public class NestedIterator<E>
This class implements the Iterator
interface
for iterating multiple collections as if it was one big collection.
Field Summary | |
---|---|
private Collection<? extends E>[] |
collections
The array to iterate. |
private Iterator<? extends E> |
current
The current iterator. |
private int |
index
The index of the next collection to return. |
Constructor Summary | |
---|---|
NestedIterator(Collection<? extends E>... collections)
Create a new ArrayIterator object. |
Method Summary | |
---|---|
boolean |
hasNext()
|
E |
next()
|
void |
remove()
This operation is not supported. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Collection<? extends E>[] collections
private int index
private Iterator<? extends E> current
Constructor Detail |
---|
public NestedIterator(Collection<? extends E>... collections)
ArrayIterator
object.
collections
- An array of Collection objects.Method Detail |
---|
public boolean hasNext()
hasNext
in interface Iterator<E>
public E next()
next
in interface Iterator<E>
public void remove()
remove
in interface Iterator<E>
UnsupportedOperationException
- Is always thrown
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |