org.hibernate.util
Class JoinedIterator
java.lang.Object
org.hibernate.util.JoinedIterator
- All Implemented Interfaces:
- Iterator
public class JoinedIterator
- extends Object
- implements Iterator
An JoinedIterator is an Iterator that wraps a number of Iterators.
This class makes multiple iterators look like one to the caller.
When any method from the Iterator interface is called, the JoinedIterator
will delegate to a single underlying Iterator. The JoinedIterator will
invoke the Iterators in sequence until all Iterators are exhausted.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JoinedIterator
public JoinedIterator(List iterators)
JoinedIterator
public JoinedIterator(Iterator[] iterators)
JoinedIterator
public JoinedIterator(Iterator first,
Iterator second)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator
next
public Object next()
- Specified by:
next
in interface Iterator
remove
public void remove()
- Specified by:
remove
in interface Iterator
updateCurrentIterator
protected void updateCurrentIterator()