Class ProgressReportingFeatureCollection
java.lang.Object
org.geotools.feature.collection.DecoratingSimpleFeatureCollection
org.tailormap.api.geotools.collection.ProgressReportingFeatureCollection
- All Implemented Interfaces:
org.geotools.data.simple.SimpleFeatureCollection, org.geotools.feature.FeatureCollection<org.geotools.api.feature.simple.SimpleFeatureType, org.geotools.api.feature.simple.SimpleFeature>
public class ProgressReportingFeatureCollection
extends org.geotools.feature.collection.DecoratingSimpleFeatureCollection
A decorating feature collection that will pass a callback to the iterator to report the number of features provided.
-
Field Summary
Fields inherited from class org.geotools.feature.collection.DecoratingSimpleFeatureCollection
delegate -
Constructor Summary
ConstructorsConstructorDescriptionProgressReportingFeatureCollection(org.geotools.data.simple.SimpleFeatureCollection delegate, int progressInterval, @Nullable IntConsumer progressCallback) Creates a newProgressReportingFeatureCollectionthat wraps the given delegate and reports progress at the specified interval. -
Method Summary
Methods inherited from class org.geotools.feature.collection.DecoratingSimpleFeatureCollection
accepts, canDelegate, contains, containsAll, equals, getBounds, getID, getSchema, hashCode, isEmpty, size, sort, subCollection, toArray, toArray
-
Constructor Details
-
ProgressReportingFeatureCollection
public ProgressReportingFeatureCollection(org.geotools.data.simple.SimpleFeatureCollection delegate, int progressInterval, @Nullable IntConsumer progressCallback) Creates a newProgressReportingFeatureCollectionthat wraps the given delegate and reports progress at the specified interval.- Parameters:
delegate- the underlyingSimpleFeatureCollectionto decorateprogressInterval- the number of features between each progress callback invocation; must be greater than0progressCallback- a callback that receives the current feature count at each interval; may benull
-
-
Method Details
-
features
public org.geotools.data.simple.SimpleFeatureIterator features()- Specified by:
featuresin interfaceorg.geotools.feature.FeatureCollection<org.geotools.api.feature.simple.SimpleFeatureType, org.geotools.api.feature.simple.SimpleFeature>- Specified by:
featuresin interfaceorg.geotools.data.simple.SimpleFeatureCollection- Overrides:
featuresin classorg.geotools.feature.collection.DecoratingSimpleFeatureCollection
-