org.jrdf.util
Interface ClosableIterator

All Superinterfaces:
Iterator
All Known Implementing Classes:
EmptyClosableIterator, GraphIterator, OneFixedIterator, ThreeFixedIterator, TwoFixedIterator

public interface ClosableIterator
extends Iterator

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:
$Revision: 1.1 $
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

public 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.