schmitzm.geotools.feature
Class PipedFeatureIterator

java.lang.Object
  extended by schmitzm.geotools.feature.PipedFeatureIterator
All Implemented Interfaces:
Iterator<Feature>

public class PipedFeatureIterator
extends Object
implements Iterator<Feature>

This class is a workaround since FeatureIterator does not implement Iterator. This class simply pipes all function calls to the FeatureIterator specified in the constructor, but can be used with the Java standard Iterator interface.

Author:
Martin Schmitz

Field Summary
protected  FeatureIterator fIter
          Holds the FeatureIterator which is piped.
 
Constructor Summary
PipedFeatureIterator(FeatureIterator fIter)
          Creates a new iterator.
 
Method Summary
 boolean hasNext()
          Checks whether a next element exists.
 Feature next()
          Returns the next Feature;
 void remove()
          Not supported, because the FeatureIterator does not support this functionality.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fIter

protected FeatureIterator fIter
Holds the FeatureIterator which is piped.

Constructor Detail

PipedFeatureIterator

public PipedFeatureIterator(FeatureIterator fIter)
Creates a new iterator.

Parameters:
fIter - FeatureIterator which is piped
Method Detail

hasNext

public boolean hasNext()
Checks whether a next element exists.

Specified by:
hasNext in interface Iterator<Feature>

next

public Feature next()
Returns the next Feature;

Specified by:
next in interface Iterator<Feature>

remove

public void remove()
Not supported, because the FeatureIterator does not support this functionality.

Specified by:
remove in interface Iterator<Feature>
Throws:
UnsupportedOperationException - always