Neo4j Enterprise

Class NestingIterator<T,U>

  extended by org.neo4j.helpers.collection.PrefetchingIterator<T>
      extended by org.neo4j.helpers.collection.NestingIterator<T,U>
Type Parameters:
T - the type of items to return
U - the type of items in the surface item iterator
All Implemented Interfaces:

public abstract class NestingIterator<T,U>
extends PrefetchingIterator<T>

Concatenates sub-iterators of an iterator. Iterates through each item in an iterator. For each item, the createNestedIterator(Object) is invoked to create a sub-iterator. The resulting iterator iterates over each item in each sub-iterator. In effect flattening the iteration.

Constructor Summary
NestingIterator(Iterator<U> source)
Method Summary
protected abstract  Iterator<T> createNestedIterator(U item)
protected  T fetchNextOrNull()
 U getCurrentSurfaceItem()
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


public NestingIterator(Iterator<U> source)
Method Detail


protected abstract Iterator<T> createNestedIterator(U item)


public U getCurrentSurfaceItem()


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

Neo4j Enterprise

Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.