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

    Constructors
    Constructor
    Description
    ProgressReportingFeatureCollection(org.geotools.data.simple.SimpleFeatureCollection delegate, int progressInterval, @Nullable IntConsumer progressCallback)
    Creates a new ProgressReportingFeatureCollection that wraps the given delegate and reports progress at the specified interval.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.geotools.data.simple.SimpleFeatureIterator
     

    Methods inherited from class org.geotools.feature.collection.DecoratingSimpleFeatureCollection

    accepts, canDelegate, contains, containsAll, equals, getBounds, getID, getSchema, hashCode, isEmpty, size, sort, subCollection, toArray, toArray

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProgressReportingFeatureCollection

      public ProgressReportingFeatureCollection(org.geotools.data.simple.SimpleFeatureCollection delegate, int progressInterval, @Nullable IntConsumer progressCallback)
      Creates a new ProgressReportingFeatureCollection that wraps the given delegate and reports progress at the specified interval.
      Parameters:
      delegate - the underlying SimpleFeatureCollection to decorate
      progressInterval - the number of features between each progress callback invocation; must be greater than 0
      progressCallback - a callback that receives the current feature count at each interval; may be null
  • Method Details

    • features

      public org.geotools.data.simple.SimpleFeatureIterator features()
      Specified by:
      features in interface org.geotools.feature.FeatureCollection<org.geotools.api.feature.simple.SimpleFeatureType, org.geotools.api.feature.simple.SimpleFeature>
      Specified by:
      features in interface org.geotools.data.simple.SimpleFeatureCollection
      Overrides:
      features in class org.geotools.feature.collection.DecoratingSimpleFeatureCollection