org.geotools.feature.collection
Class FilteredIterator

java.lang.Object
  extended byorg.geotools.feature.collection.FilteredIterator
All Implemented Interfaces:
java.util.Iterator

public class FilteredIterator
extends java.lang.Object
implements java.util.Iterator

Provides an implementation of Iterator that will filter contents using the provided filter.

This is a *Generic* iterator not limited to Feature, this will become more interesting as Filter is able to evaulate itself with more things then just Features.

This also explains the use of Collection (where you may have expected a FeatureCollection). However FeatureCollectoin.close( iterator ) will be called on the internal delgate.

Author:
Jody Garnett, Refractions Research, Inc.

Constructor Summary
FilteredIterator(FeatureCollection collection, Filter filter)
           
FilteredIterator(java.util.Iterator iterator, Filter filter)
           
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteredIterator

public FilteredIterator(java.util.Iterator iterator,
                        Filter filter)

FilteredIterator

public FilteredIterator(FeatureCollection collection,
                        Filter filter)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

public void remove()
Specified by:
remove in interface java.util.Iterator


Copyright © GeoTools. All Rights Reserved.