org.hibernate.internal.util.collections
Class JoinedIterator

java.lang.Object
  extended by org.hibernate.internal.util.collections.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.


Constructor Summary
JoinedIterator(Iterator[] iterators)
           
JoinedIterator(Iterator first, Iterator second)
           
JoinedIterator(List iterators)
           
 
Method Summary
 boolean hasNext()
           
 Object next()
           
 void remove()
           
protected  void updateCurrentIterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinedIterator

public JoinedIterator(List iterators)

JoinedIterator

public JoinedIterator(Iterator[] iterators)

JoinedIterator

public JoinedIterator(Iterator first,
                      Iterator second)
Method Detail

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()


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.