org.neo4j.helpers.collection
Class ResourceClosingIterator<T,V>

java.lang.Object
  extended by org.neo4j.helpers.collection.ResourceClosingIterator<T,V>
All Implemented Interfaces:
Closeable, Iterator<V>, ResourceIterator<V>

public abstract class ResourceClosingIterator<T,V>
extends Object
implements ResourceIterator<V>


Method Summary
 void close()
          Close the iterator early, freeing associated resources It is an error to use the iterator after this has been called.
 boolean hasNext()
           
abstract  V map(T elem)
           
static
<T> ResourceIterator<T>
newResourceIterator(Closeable closeable, Iterator<T> iterator)
           
 V next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newResourceIterator

public static <T> ResourceIterator<T> newResourceIterator(Closeable closeable,
                                                          Iterator<T> iterator)

close

public void close()
Description copied from interface: ResourceIterator
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
Specified by:
close in interface ResourceIterator<V>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<V>

map

public abstract V map(T elem)

next

public V next()
Specified by:
next in interface Iterator<V>

remove

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


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