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

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

public class IteratorChain<E>
extends Object
implements Iterator<E>

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


Constructor Summary
IteratorChain()
           
 
Method Summary
 void addIterator(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(Iterator<E> it)

hasNext

public boolean hasNext()
Specified by:
hasNext in interface 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 Iterator<E>

remove

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


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.