eu.larkc.core.data
Interface CloseableIterator<T>

Type Parameters:
T - type of the processed resource
All Superinterfaces:
java.util.Iterator<T>
All Known Implementing Classes:
GraphResultBase.BlockingQueueIterator, ORDICloseableIterator, RdfGraphDataSet.GraphCloseableIterator, RDFHandlerIterator, SimpleCloseableIterator, VariableBindingBase.BindingIterator

public interface CloseableIterator<T>
extends java.util.Iterator<T>

This class implements client side closeable iterator for the processing of long streamed results.

Author:
vassil

Method Summary
 void close()
          Closes the current iterator and all subsequent operations will raise exception.
 boolean hasNext()
          Checks whether the next result could be returned.
 boolean isClosed()
          Verifies if the current iterator is closed.
 T next()
          Fetches the next result from the iterator.
 void remove()
          Removes the current item from the iterated collection.
 

Method Detail

hasNext

boolean hasNext()
Checks whether the next result could be returned.

Specified by:
hasNext in interface java.util.Iterator<T>
Returns:
whether a next item is available

next

T next()
Fetches the next result from the iterator.

Specified by:
next in interface java.util.Iterator<T>
Returns:
the next item

remove

void remove()
Removes the current item from the iterated collection. This method may be not implemented.

Specified by:
remove in interface java.util.Iterator<T>

close

void close()
Closes the current iterator and all subsequent operations will raise exception. The method could be invoked many times.


isClosed

boolean isClosed()
Verifies if the current iterator is closed.

Returns:
is closed