Class CollectionFeatureSource.SubCollection
- All Implemented Interfaces:
SimpleFeatureCollection
,FeatureCollection<SimpleFeatureType,
SimpleFeature>
- Enclosing class:
- CollectionFeatureSource
Will route any calls refining the feature collection back to CollectionFeatureSource. This is based on the success of ContentFeatureCollection.
- Author:
- Jody
-
Field Summary
Fields inherited from class DecoratingSimpleFeatureCollection
delegate
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SubCollection
(Query query, SimpleFeatureCollection features) -
Method Summary
Modifier and TypeMethodDescriptionObtained sorted contents.subCollection
(Filter filter) SimpleFeatureCollection "view" indicated by provided filter.Methods inherited from class DecoratingSimpleFeatureCollection
accepts, canDelegate, contains, containsAll, equals, features, getBounds, getID, getSchema, hashCode, isEmpty, size, toArray, toArray
-
Constructor Details
-
SubCollection
-
-
Method Details
-
subCollection
Description copied from interface:FeatureCollection
SimpleFeatureCollection "view" indicated by provided filter.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:
The above recommended use is agreement with the Collections API precident of List.subList( start, end ).collection.subCollection( filter ).clear();
The results of subCollection:
- are to be considered unordered
- may be an ordered FeatureList if requested when sortBy is indicated
- Specified by:
subCollection
in interfaceFeatureCollection<SimpleFeatureType,
SimpleFeature> - Specified by:
subCollection
in interfaceSimpleFeatureCollection
- Overrides:
subCollection
in classDecoratingSimpleFeatureCollection
- Returns:
- SimpleFeatureCollection identified as subset.
- See Also:
-
FeatureList
-
sort
Description copied from interface:FeatureCollection
Obtained sorted contents.This method may not be supported by all implementations, consider the use of FeatureSource.features( Query ).
- Specified by:
sort
in interfaceFeatureCollection<SimpleFeatureType,
SimpleFeature> - Specified by:
sort
in interfaceSimpleFeatureCollection
- Overrides:
sort
in classDecoratingSimpleFeatureCollection
- Parameters:
order
- Sort order- Returns:
- FeatureCollection sorted in the indicated order
-