public interface IFeatureCollection extends Serializable
IFeature,
IAttributeDefinition,
IGeometryAttributeDefinition,
Feature| Modifier and Type | Method and Description |
|---|---|
default void |
add(IFeature feature)
Adds the specified feature to this feature collection or throws an UnsupportedOperationException if this feature
collection does not support adding a feature.
|
default void |
addAll(IFeatureCollection features)
Adds all of the feature instances in the specified feature collection to this feature collection.
|
default void |
clear()
Removes all features from this feature collection.
|
IFeatureCollectionMetadata |
getMetadata()
Accesses the metadata that describes this feature collection.
|
boolean |
isReadOnly()
Indicates if the feature collection is read only.
|
boolean |
isTransient()
Indicates if this
IFeatureCollection is transient. |
IFeatureIterator |
iterator()
Returns an iterator for accessing each of the
IFeature instances
contained within this feature collection. |
default void |
remove(IFeature feature)
Removes the specified feature from this collection.
|
default void |
removeAll(IFeatureCollection features)
Removes all of the supplied features from this feature collection.
|
IFeatureCollectionMetadata getMetadata()
IFeatureCollectionMetadata.boolean isTransient()
IFeatureCollection is transient. An instance of
IFeatureCollection may have a lifetime that is controlled by an
iterator, cursor, or other entity. A typical occurrence of transient features
occurs when searching a database table. The feature iterator used to return the
data in the result set returns IFeatureCollection instances whose data is connected
to the memory of the cursor. When the next feature is accessed, the same memory is
reused, thus making the previous feature invalid. These features are said to be
transient.
There is no guarantee that repositioning a cursor returns the same
feature each time, however, even if different feature instances are returned, the previous
feature instance should be assumed to be invalid and cannot be accessed.
Transient does not have any relationship to the editability of the data. Features,
feature collections, and tables may be edited even if they are designated as transient.
Transient simply refers to the lifetime of the IFeatureCollection and whether
or not its memory may be reclaimed or reused as the result of some other action such as
advancing an iterator or cursor.true if this feature is transient; false otherwise.boolean isReadOnly()
true if this feature collection denies edits;
false otherwise.IFeatureIterator iterator()
IFeature instances
contained within this feature collection.
Feature collections that are backed by database management system
or other data access technology may have to build and execute a SQL statement
such as "Select * From ..." to provide access to the features. If this is the case,
it is important to always dispose of the IFeatureIterator. Refer to
the IFeatureIterator.dispose() documentation for more details.default void add(IFeature feature)
The default implementation throws an UnsupportedOperationException.
feature - the feature to add to this feature collection.UnsupportedOperationException - if this feature collection does not support additions.NullPointerException - if the specified feature is null.MetadataMismatchException - if the metadata of the specified feature does not match this collections metadata.default void addAll(IFeatureCollection features)
The default implementation does the equivalent of thew following:
features.iterator().forEachRemaining(this::add);
features - the features to add to this feature collection.UnsupportedOperationException - if this feature collection does not support additions.NullPointerException - if the specified feature collection is null.MetadataMismatchException - if the feature metadata does not match the collection metadata.default void remove(IFeature feature)
The default implementation throws an UnsupportedOperationException.
feature - the feature to remove from the collection.UnsupportedOperationException - if this feature collection does not support removals.NullPointerException - if the specified feature is null.MetadataMismatchException - if the feature metadata does not match the collection metadata.default void removeAll(IFeatureCollection features)
features - the feature to remove from this feature collection.
The default implementation does the equivalent of thew following:
features.iterator().forEachRemaining(this::remove);
UnsupportedOperationException - if this feature collection does not support removals.NullPointerException - if the specified feature collection is null.MetadataMismatchException - if the feature metadata does not match the collection metadata.default void clear()
The default implementation throws an UnsupportedOperationException.
UnsupportedOperationException - if this feature collection does not support clearing features..© 2007, 2022 Precisely. All rights reserved.