Class ChangesetIdChangedEvent
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent
-
- org.openstreetmap.josm.data.osm.event.ChangesetIdChangedEvent
-
public class ChangesetIdChangedEvent extends AbstractDatasetChangedEvent
An event that is triggered when the changeset id has changed for a list of primitives.
-
-
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 int
newChangesetId
private int
oldChangesetId
private java.util.List<OsmPrimitive>
primitives
-
Fields inherited from class org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent
dataSet
-
-
Constructor Summary
Constructors Constructor Description ChangesetIdChangedEvent(DataSet dataSet, java.util.List<OsmPrimitive> primitives, int oldChangesetId, int newChangesetId)
Constructs a newChangesetIdChangedEvent
.
-
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.int
getNewChangesetId()
Returns the new changeset id.int
getOldChangesetId()
Returns the old changeset id.java.util.List<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
-
primitives
private final java.util.List<OsmPrimitive> primitives
-
oldChangesetId
private final int oldChangesetId
-
newChangesetId
private final int newChangesetId
-
-
Constructor Detail
-
ChangesetIdChangedEvent
public ChangesetIdChangedEvent(DataSet dataSet, java.util.List<OsmPrimitive> primitives, int oldChangesetId, int newChangesetId)
Constructs a newChangesetIdChangedEvent
.- Parameters:
dataSet
- the dataset from which the event comes fromprimitives
- list of affected primitivesoldChangesetId
- old changeset idnewChangesetId
- new changeset id
-
-
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
-
getPrimitives
public java.util.List<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
-
getOldChangesetId
public int getOldChangesetId()
Returns the old changeset id.- Returns:
- the old changeset id
-
getNewChangesetId
public int getNewChangesetId()
Returns the new changeset id.- Returns:
- the new changeset id
-
-