Class RelationMembersChangedEvent
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent
-
- org.openstreetmap.josm.data.osm.event.RelationMembersChangedEvent
-
public class RelationMembersChangedEvent extends AbstractDatasetChangedEvent
An event that is triggered if the members of a single relation have changed
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent
AbstractDatasetChangedEvent.DatasetEventType
-
-
Field Summary
Fields Modifier and Type Field Description private Relationrelation-
Fields inherited from class org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent
dataSet
-
-
Constructor Summary
Constructors Constructor Description RelationMembersChangedEvent(DataSet dataSet, Relation relation)Constructs a newRelationMembersChangedEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfire(DataSetListener listener)Calls the appropriate method of the listener for this event.java.util.List<? extends OsmPrimitive>getPrimitives()Returns list of primitives modified by this event.RelationgetRelation()Returns the relation affected by the change.AbstractDatasetChangedEvent.DatasetEventTypegetType()Returns the type of dataset changed event.-
Methods inherited from class org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent
getDataset, toString
-
-
-
-
Constructor Detail
-
RelationMembersChangedEvent
public RelationMembersChangedEvent(DataSet dataSet, Relation relation)
Constructs a newRelationMembersChangedEvent.- Parameters:
dataSet- the dataset from which the event comes fromrelation- the relation affected by the change
-
-
Method Detail
-
fire
public void fire(DataSetListener listener)
Description copied from class:AbstractDatasetChangedEventCalls the appropriate method of the listener for this event.- Specified by:
firein classAbstractDatasetChangedEvent- Parameters:
listener- dataset listener to notify about this event
-
getRelation
public Relation getRelation()
Returns the relation affected by the change.- Returns:
- the relation affected by the change
-
getPrimitives
public java.util.List<? extends OsmPrimitive> getPrimitives()
Description copied from class:AbstractDatasetChangedEventReturns list of primitives modified by this event.
WARNING This value might be incorrect in case ofDataChangedEvent. It returns all primitives in the dataset when this method is called (live list), not list of primitives when the event was created- Specified by:
getPrimitivesin classAbstractDatasetChangedEvent- Returns:
- List of modified primitives
-
getType
public AbstractDatasetChangedEvent.DatasetEventType getType()
Description copied from class:AbstractDatasetChangedEventReturns the type of dataset changed event.- Specified by:
getTypein classAbstractDatasetChangedEvent- Returns:
- the type of dataset changed event
-
-