org.neo4j.graphdb
Interface ResourceIterator<T>

Type Parameters:
T - type of values returned by this Iterator
All Superinterfaces:
Closeable, Iterator<T>
All Known Subinterfaces:
IndexHits<T>
All Known Implementing Classes:
ResourceClosingIterator

public interface ResourceIterator<T>
extends Iterator<T>, Closeable

Closeable Iterator with associated resources that needs to be managed.

If the iterator is not depleted (run until Iterator.hasNext() returns false), the close() method should be invoked to free these resources (i.e. in a finally-block, or try-with-resource).


Method Summary
 void close()
          Close the iterator early, freeing associated resources It is an error to use the iterator after this has been called.
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

close

void close()
Close the iterator early, freeing associated resources It is an error to use the iterator after this has been called.

Specified by:
close in interface Closeable


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