GeoAPI 2.0
Build 2005-06-08

org.opengis.feature
Interface FeatureIterator

All Superinterfaces:
Iterator<Feature>

public interface FeatureIterator
extends Iterator<Feature>

Extends the Iterator interface to include a close method for cleaning up connections to a persistent store.

Since:
GeoAPI 2.0

Method Summary
 void close()
          If applicable, closes any connection to a persistent store that backs this iterator.
 boolean hasNext()
          Method inherited from Iterator that indicates whether there's another feature available.
 Feature next()
          Method inherited from Iterator that returns the next Feature object from the iterator.
 void remove()
          If supported by the underlying FeatureCollection, invoking this method will remove the last Feature returned by next().
 

Method Detail

hasNext

boolean hasNext()
                throws BackingStoreException
Method inherited from Iterator that indicates whether there's another feature available.

Because no exceptions are thrown in the Iterator interface, any I/O exceptions that occur while executing this method must be wrapped in a BackingStoreException before being thrown.

Specified by:
hasNext in interface Iterator<Feature>
Throws:
BackingStoreException - If an error occurs while fetching the feature.

next

Feature next()
             throws BackingStoreException
Method inherited from Iterator that returns the next Feature object from the iterator.

Because no exceptions are thrown in the Iterator interface, any I/O exceptions that occur while executing this method must be wrapped in a BackingStoreException before being thrown.

Specified by:
next in interface Iterator<Feature>
Throws:
BackingStoreException - If an error occurs while fetching the feature.

remove

void remove()
            throws UnsupportedOperationException,
                   BackingStoreException
If supported by the underlying FeatureCollection, invoking this method will remove the last Feature returned by next().

Specified by:
remove in interface Iterator<Feature>
Throws:
UnsupportedOperationException - If removing items is not supported by the underlying collection.
BackingStoreException - If an error occurs while removing the feature.

close

void close()
           throws IOException
If applicable, closes any connection to a persistent store that backs this iterator.

Throws:
IOException - if an error occurs while closing the iterator.

GeoAPI 2.0
Build 2005-06-08

Symbols, terms and definitions
Copyright OpenGIS® Consortium