Interface CloseableIterator<T>

Type Parameters:
T - type of elements of the iterator
All Superinterfaces:
AutoCloseable, Closeable
All Known Subinterfaces:
CloseableIteratorWithoutException<T>, InMemoryStream<T>, Parser<T>
All Known Implementing Classes:
AbstractCloseableIterator, ArrayBlockingStream, CloseableIteratorAdapter, CSVParser, DlgpeParser, DlgpParser, FilterIterator, FilterIteratorWithoutException, RDFParser, RLSCSVParser, RLSCSVsParser

public interface CloseableIterator<T> extends Closeable
Represents an iterator whose traversal can raise checked exceptions and that must be closed.
Author:
Clément Sipieter (INRIA) <clement@6pi.fr>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the iterator and releases its resources.
    boolean
    Indicates whether another element can be read from the iterator.
    Returns the next element from the iterator.
  • Method Details

    • hasNext

      boolean hasNext() throws IteratorException
      Indicates whether another element can be read from the iterator.
      Returns:
      true iff there is a next element
      Throws:
      IteratorException - if an exception occur
    • next

      T next() throws IteratorException
      Returns the next element from the iterator.
      Returns:
      the next element
      Throws:
      IteratorException - if an exception occur
    • close

      void close()
      Closes the iterator and releases its resources.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable