Package org.geotools.feature
Class CollectionEvent
Object
EventObject
CollectionEvent
- All Implemented Interfaces:
Serializable
A simple event object to represent all events triggered by FeatureCollection instances (typically change events).
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
event type constant denoting the adding of a featurestatic final int
event type constant denoting that features in the collection has been modifiedstatic final int
event type constant denoting the removal of a featureFields inherited from class EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionCollectionEvent
(FeatureCollection<? extends FeatureType, ? extends Feature> collection, FeatureEvent event) CollectionEvent
(FeatureCollection<? extends FeatureType, ? extends Feature> source, SimpleFeature[] involvedFeatures, int type) Constructs a new CollectionEvent. -
Method Summary
Modifier and TypeMethodDescriptionFeatureCollection<? extends FeatureType,
? extends Feature> provides access to the SimpleFeatureCollection which fired the eventint
Provides information on the type of change that has occured.Getter for property features.Methods inherited from class EventObject
getSource, toString
-
Field Details
-
FEATURES_ADDED
public static final int FEATURES_ADDEDevent type constant denoting the adding of a feature- See Also:
-
FEATURES_REMOVED
public static final int FEATURES_REMOVEDevent type constant denoting the removal of a feature- See Also:
-
FEATURES_CHANGED
public static final int FEATURES_CHANGEDevent type constant denoting that features in the collection has been modified- See Also:
-
-
Constructor Details
-
CollectionEvent
public CollectionEvent(FeatureCollection<? extends FeatureType, ? extends Feature> collection, FeatureEvent event) -
CollectionEvent
public CollectionEvent(FeatureCollection<? extends FeatureType, ? extends Feature> source, SimpleFeature[] involvedFeatures, int type) Constructs a new CollectionEvent.- Parameters:
source
- the collection which triggered the event
-
-
Method Details
-
getCollection
provides access to the SimpleFeatureCollection which fired the event- Returns:
- The SimpleFeatureCollection which was the event's source.
-
getEventType
public int getEventType()Provides information on the type of change that has occured. Possible types are: add, remove, change- Returns:
- an int which must be one of FEATURES_ADDED, FEATURES_REMOVED, FEATURES_CHANGED
-
getFeatures
Getter for property features.- Returns:
- Value of property features.
-