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 Object
Base class of all dataset change events.
Since:
2622
  • Field Details

    • dataSet

      protected final DataSet dataSet
      The dataset from which the event came from.
  • Constructor Details

    • AbstractDatasetChangedEvent

      Constructs a new AbstractDatasetChangedEvent.
      Parameters:
      dataSet - the dataset from which the event came from
  • Method Details

    • 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 Collection<? extends OsmPrimitive> getPrimitives()
      Returns list of primitives modified by this event.
      WARNING This value might be incorrect in case of DataChangedEvent. 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

      Returns the type of dataset changed event.
      Returns:
      the type of dataset changed event
    • toString

      public String toString()
      Overrides:
      toString in class Object