org.geotools.data
Class SampleDataAccessFeatureIterator

java.lang.Object
  extended by org.geotools.data.SampleDataAccessFeatureIterator
All Implemented Interfaces:
FeatureIterator<org.opengis.feature.Feature>

public class SampleDataAccessFeatureIterator
extends java.lang.Object
implements FeatureIterator<org.opengis.feature.Feature>

Decorator for Iterator<Feature> to provide a FeatureIterator<Feature> that adds a close method that does nothing. This class exists only to satisfy the FeatureCollection API. All iteration is performed using the iterator passed to the constructor.

Since:
2.6
Version:
$Id: SampleDataAccessFeatureIterator.java 32071 2008-12-24 03:03:33Z bencaradocdavies $
Author:
Ben Caradoc-Davies, CSIRO Exploration and Mining

Constructor Summary
SampleDataAccessFeatureIterator(java.util.Iterator<org.opengis.feature.Feature> iterator)
          Constructor.
 
Method Summary
 void close()
          Nothing to close.
 boolean hasNext()
          Does another Feature exist in this Iteration.
 org.opengis.feature.Feature next()
          Get the next Feature in this iteration.
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleDataAccessFeatureIterator

public SampleDataAccessFeatureIterator(java.util.Iterator<org.opengis.feature.Feature> iterator)
Constructor.

Parameters:
iterator - iterator to which all iteration is delegated.
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: FeatureIterator
Does another Feature exist in this Iteration.

Iterator defin: Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Specified by:
hasNext in interface FeatureIterator<org.opengis.feature.Feature>
Returns:
true if more Features exist, false otherwise.
See Also:
Iterator.hasNext()

next

public org.opengis.feature.Feature next()
Description copied from interface: FeatureIterator
Get the next Feature in this iteration.

Specified by:
next in interface FeatureIterator<org.opengis.feature.Feature>
Returns:
The next Feature
See Also:
Iterator.next()

remove

public void remove()
See Also:
Iterator.remove()

close

public void close()
Nothing to close.

Specified by:
close in interface FeatureIterator<org.opengis.feature.Feature>
See Also:
FeatureIterator.close()


Copyright © 1996-2010 Geotools. All Rights Reserved.