Class AbstractDatasetChangedEvent
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent
-
- Direct Known Subclasses:
ChangesetIdChangedEvent
,DataChangedEvent
,FilterChangedEvent
,NodeMovedEvent
,PrimitiveFlagsChangedEvent
,PrimitivesAddedEvent
,PrimitivesRemovedEvent
,RelationMembersChangedEvent
,TagsChangedEvent
,WayNodesChangedEvent
public abstract class AbstractDatasetChangedEvent extends java.lang.Object
Base class of all dataset change events.- Since:
- 2622
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractDatasetChangedEvent.DatasetEventType
Type of dataset changed event, returned bygetType()
.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDatasetChangedEvent(DataSet dataSet)
Constructs a newAbstractDatasetChangedEvent
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
fire(DataSetListener listener)
Calls the appropriate method of the listener for this event.DataSet
getDataset()
Returns the dataset from which the event came from.abstract java.util.Collection<? extends OsmPrimitive>
getPrimitives()
Returns list of primitives modified by this event.abstract AbstractDatasetChangedEvent.DatasetEventType
getType()
Returns the type of dataset changed event.java.lang.String
toString()
-
-
-
Constructor Detail
-
AbstractDatasetChangedEvent
protected AbstractDatasetChangedEvent(DataSet dataSet)
Constructs a newAbstractDatasetChangedEvent
.- Parameters:
dataSet
- the dataset from which the event came from
-
-
Method Detail
-
fire
public abstract void fire(DataSetListener listener)
Calls the appropriate method of the listener for this event.- Parameters:
listener
- dataset listener to notify about this event
-
getPrimitives
public abstract java.util.Collection<? extends OsmPrimitive> getPrimitives()
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- Returns:
- List of modified primitives
-
getDataset
public DataSet getDataset()
Returns the dataset from which the event came from.- Returns:
- the dataset from which the event came from
-
getType
public abstract AbstractDatasetChangedEvent.DatasetEventType getType()
Returns the type of dataset changed event.- Returns:
- the type of dataset changed event
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-