protected class CollectionFeatureSource.SubCollection extends DecoratingSimpleFeatureCollection
Will route any calls refining the feature collection back to CollectionFeatureSource. This is based on the success of ContentFeatureCollection.
delegate
Modifier | Constructor and Description |
---|---|
protected |
SubCollection(Query query,
SimpleFeatureCollection features) |
Modifier and Type | Method and Description |
---|---|
SimpleFeatureCollection |
sort(SortBy order)
Obtained sorted contents.
|
SimpleFeatureCollection |
subCollection(Filter filter)
SimpleFeatureCollection "view" indicated by provided filter.
|
accepts, canDelegate, contains, containsAll, equals, features, getBounds, getID, getSchema, hashCode, isEmpty, size, toArray, toArray
protected SubCollection(Query query, SimpleFeatureCollection features)
public SimpleFeatureCollection subCollection(Filter filter)
FeatureCollection
The contents of the returned SimpleFeatureCollection are determined by applying the provider Filter to the entire contents of this FeatureCollection. The result is "live" and modifications will be shared.
This method is used cut down on the number of filter based methods required for a useful SimpleFeatureCollection construct. The FeatureCollections returned really should be considered as a temporary "view" used to control the range of a removeAll, or modify operation.
Example Use:
collection.subCollection( filter ).clear();
The above recommended use is agreement with the Collections API precident of List.subList(
start, end ).
The results of subCollection:
subCollection
in interface SimpleFeatureCollection
subCollection
in interface FeatureCollection<SimpleFeatureType,SimpleFeature>
subCollection
in class DecoratingSimpleFeatureCollection
FeatureList
public SimpleFeatureCollection sort(SortBy order)
FeatureCollection
This method may not be supported by all implementations, consider the use of FeatureSource.features( Query ).
sort
in interface SimpleFeatureCollection
sort
in interface FeatureCollection<SimpleFeatureType,SimpleFeature>
sort
in class DecoratingSimpleFeatureCollection
order
- Sort orderCopyright © 1996–2019 Geotools. All rights reserved.