Class FeatureReaderIterator<F extends Feature>

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Iterator<F>

    public class FeatureReaderIterator<F extends Feature>
    extends Object
    implements Iterator<F>, Closeable
    An iterator that wraps around a FeatureReader.

    The Iterator's hasNext() will return false if the wrapped feature reader's hasNext method throws an exception. If next() throws an exception a NoSuchElementException will be thrown.

    close() shall be called before disposing the iterator. Before propagating an exception from next() or eating an exception from the underlying feature reader at hasNext(), this iterator will auto-close.

    Author:
    jeichar, Jody Garnett, Gabriel Roldan