Class TagsChangedEvent
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent
-
- org.openstreetmap.josm.data.osm.event.TagsChangedEvent
-
public class TagsChangedEvent extends AbstractDatasetChangedEvent
An event that is triggered if the tags of a single primitive 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 Map<String,String>
originalKeys
private OsmPrimitive
primitive
-
Fields inherited from class org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent
dataSet
-
-
Constructor Summary
Constructors Constructor Description TagsChangedEvent(DataSet dataSet, OsmPrimitive primitive, Map<String,String> originalKeys)
Constructs a newTagsChangedEvent
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fire(DataSetListener listener)
Calls the appropriate method of the listener for this event.Map<String,String>
getOriginalKeys()
Returns the original tags.OsmPrimitive
getPrimitive()
Returns the primitive affected by the change.List<? extends OsmPrimitive>
getPrimitives()
Returns list of primitives modified by this event.AbstractDatasetChangedEvent.DatasetEventType
getType()
Returns the type of dataset changed event.-
Methods inherited from class org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent
getDataset, toString
-
-
-
-
Field Detail
-
primitive
private final OsmPrimitive primitive
-
originalKeys
private final Map<String,String> originalKeys
-
-
Constructor Detail
-
TagsChangedEvent
public TagsChangedEvent(DataSet dataSet, OsmPrimitive primitive, Map<String,String> originalKeys)
Constructs a newTagsChangedEvent
.- Parameters:
dataSet
- the dataset from which the event comes fromprimitive
- the primitive affected by the changeoriginalKeys
- the original tags
-
-
Method Detail
-
fire
public void fire(DataSetListener listener)
Description copied from class:AbstractDatasetChangedEvent
Calls the appropriate method of the listener for this event.- Specified by:
fire
in classAbstractDatasetChangedEvent
- Parameters:
listener
- dataset listener to notify about this event
-
getPrimitive
public OsmPrimitive getPrimitive()
Returns the primitive affected by the change.- Returns:
- the primitive affected by the change
-
getPrimitives
public List<? extends OsmPrimitive> getPrimitives()
Description copied from class:AbstractDatasetChangedEvent
Returns 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:
getPrimitives
in classAbstractDatasetChangedEvent
- Returns:
- List of modified primitives
-
getType
public AbstractDatasetChangedEvent.DatasetEventType getType()
Description copied from class:AbstractDatasetChangedEvent
Returns the type of dataset changed event.- Specified by:
getType
in classAbstractDatasetChangedEvent
- Returns:
- the type of dataset changed event
-
getOriginalKeys
public Map<String,String> getOriginalKeys()
Returns the original tags.- Returns:
- the original tags
-
-