org.neo4j.helpers.collection
Class CombiningIterator<T>

java.lang.Object
  extended by org.neo4j.helpers.collection.PrefetchingIterator<T>
      extended by org.neo4j.helpers.collection.CombiningIterator<T>
Type Parameters:
T - the type of items in the iteration.
All Implemented Interfaces:
Iterator<T>

public class CombiningIterator<T>
extends PrefetchingIterator<T>

Combining one or more Iterators, making them look like they were one big iterator. All iteration/combining is done lazily.


Constructor Summary
CombiningIterator(Iterable<? extends Iterator<T>> iterators)
           
CombiningIterator(T first, Iterator<T> rest)
           
 
Method Summary
protected  Iterator<T> currentIterator()
           
protected  T fetchNextOrNull()
           
 
Methods inherited from class org.neo4j.helpers.collection.PrefetchingIterator
getPrefetchedNextOrNull, hasNext, next, remove, setPrefetchedNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CombiningIterator

public CombiningIterator(Iterable<? extends Iterator<T>> iterators)

CombiningIterator

public CombiningIterator(T first,
                         Iterator<T> rest)
Method Detail

fetchNextOrNull

protected T fetchNextOrNull()
Specified by:
fetchNextOrNull in class PrefetchingIterator<T>

currentIterator

protected Iterator<T> currentIterator()


Copyright © 2011 The Neo4j Graph Database Project. All Rights Reserved.