org.apache.solr.util
Class IteratorChain<E>

java.lang.Object
  extended by org.apache.solr.util.IteratorChain<E>
All Implemented Interfaces:
java.util.Iterator<E>

public class IteratorChain<E>
extends java.lang.Object
implements java.util.Iterator<E>

Chain several Iterators, so that this iterates over all of them in sequence.


Constructor Summary
IteratorChain()
           
 
Method Summary
 void addIterator(java.util.Iterator<E> it)
           
 boolean hasNext()
           
 E next()
          hasNext() must ALWAYS be called before calling this otherwise it's a bit hard to keep track of what's happening
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratorChain

public IteratorChain()
Method Detail

addIterator

public void addIterator(java.util.Iterator<E> it)

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<E>

next

public E next()
hasNext() must ALWAYS be called before calling this otherwise it's a bit hard to keep track of what's happening

Specified by:
next in interface java.util.Iterator<E>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<E>


Copyright © 2006 - 2009 The Apache Software Foundation