Package org.apache.sis.internal.storage
Class MemoryFeatureSet
java.lang.Object
org.apache.sis.storage.AbstractResource
org.apache.sis.storage.AbstractFeatureSet
org.apache.sis.internal.storage.MemoryFeatureSet
- All Implemented Interfaces:
DataSet,FeatureSet,Resource
Set of features stored in memory. Features are specified at construction time.
Metadata can be specified by overriding
.
invalid reference
#createMetadata(MetadataBuilder)
- Since:
- 1.0
- Version:
- 1.2
- Author:
- Johann Sorel (Geomatys), Martin Desruisseaux (Geomatys)
-
Field Summary
Fields inherited from class org.apache.sis.storage.AbstractResource
listeners -
Constructor Summary
ConstructorsConstructorDescriptionMemoryFeatureSet(StoreListeners parent, DefaultFeatureType type, Collection<AbstractFeature> features) Creates a new set of features stored in memory. -
Method Summary
Methods inherited from class org.apache.sis.storage.AbstractFeatureSet
createMetadata, getIdentifierMethods inherited from class org.apache.sis.storage.AbstractResource
addListener, clearCache, getEnvelope, getMetadata, getSynchronizationLock, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.sis.storage.DataSet
getEnvelopeMethods inherited from interface org.apache.sis.storage.FeatureSet
subsetMethods inherited from interface org.apache.sis.storage.Resource
addListener, getMetadata, removeListener
-
Constructor Details
-
MemoryFeatureSet
public MemoryFeatureSet(StoreListeners parent, DefaultFeatureType type, Collection<AbstractFeature> features) Creates a new set of features stored in memory. It is caller responsibility to ensure thatAbstractFeature.getType() == typefor all elements in the given collection (this is not verified).- Parameters:
parent- listeners of the parent resource, ornullif none.type- the type of all features in the given collection.features- collection of stored features. This collection will not be copied.
-
-
Method Details
-
getType
Returns the type common to all feature instances in this set.- Returns:
- a description of properties that are common to all features in this dataset.
-
getFeatureCount
Returns the number of features in this set.- Overrides:
getFeatureCountin classAbstractFeatureSet- Returns:
- the number of features.
-
features
Returns a stream of all features contained in this dataset.- Parameters:
parallel-truefor a parallel stream (if supported), orfalsefor a sequential stream.- Returns:
- all features contained in this dataset.
-