public class FilteredIterator<F extends Feature> extends Object implements Iterator<F>, FeatureIterator<F>
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.
| Constructor and Description |
|---|
FilteredIterator(Collection<F> collection,
Filter filter) |
FilteredIterator(Iterator<F> iterator,
Filter filter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Package protected, please use SubFeatureCollection.close( iterator )
|
boolean |
hasNext()
Does another Feature exist in this Iteration.
|
F |
next()
Get the next Feature in this iteration.
|
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic FilteredIterator(Collection<F> collection, Filter filter)
public void close()
close in interface Closeableclose in interface AutoCloseableclose in interface FeatureIterator<F extends Feature>public boolean hasNext()
FeatureIteratorIterator 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.)
public F next()
FeatureIteratorCopyright © 1996–2021 Geotools. All rights reserved.