org.jrdf.util
Interface ClosableIterator<E>

All Superinterfaces:
Iterator<E>
All Known Subinterfaces:
ClosableLocalIterator<Triple>, RDFEventReader
All Known Implementing Classes:
AnyResourceIterator, AnyResourcePredicateIterator, AnyResourcePredicateIterator, BlankNodeResourceIterator, BTreeGraphIterator, EmptyClosableIterator, FixedResourcePredicateIterator, GlobalizedGraphIterator, GraphIterator, NodeTypeIterator, NTriplesEventReader, ObjectNodeIterator, OneFixedIterator, OneFixedIterator, PredicateClosableIterator, ResourceIterator, SubjectNodeIterator, ThreeFixedIterator, ThreeFixedIterator, TripleClosableIterator, TwoFixedIterator, TwoFixedIterator, URIReferenceResourceIterator

public interface ClosableIterator<E>
extends Iterator<E>

An that intializes objects from a graph one at a time.

The close method indicates that the resources being held by the iterator should be freed. Based on Jena's CloseableIterator class.

Version:
$Id: ClosableIterator.java 1806 2008-01-08 03:40:35Z newmana $
Author:
Andrew Newman

Method Summary
 boolean close()
          Closes the iterator by freeing any resources that it current holds.
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

close

boolean close()
Closes the iterator by freeing any resources that it current holds.

This must be done as soon as possible. Once an iterator is closed none of the operations on a iterator will operate i.e. they will throw an exception.

Returns:
true if it was successfully closed.