org.hibernate.util

Class JoinedIterator

Implemented Interfaces:
Iterator

public class JoinedIterator
extends java.lang.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.

Constructor Summary

JoinedIterator(Iterator first, Iterator second)
JoinedIterator(Iterator[] iterators)
JoinedIterator(List iterators)

Method Summary

boolean
hasNext()
Object
next()
void
remove()
protected void
updateCurrentIterator()

Constructor Details

JoinedIterator

public JoinedIterator(Iterator first,
                      Iterator second)

JoinedIterator

public JoinedIterator(Iterator[] iterators)

JoinedIterator

public JoinedIterator(List iterators)

Method Details

hasNext

public boolean hasNext()

next

public Object next()

remove

public void remove()

updateCurrentIterator

protected void updateCurrentIterator()