Package org.openstreetmap.josm.data.osm
Interface DataSourceChangeEvent
-
- All Known Implementing Classes:
AbstractDataSourceChangeEvent
,DataSourceAddedEvent
,DataSourceRemovedEvent
public interface DataSourceChangeEvent
The event that is fired when the data source list is changed.- Since:
- 15609
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.Set<DataSource>
getAdded()
Gets the data sources that have been added to the selection.java.util.Set<DataSource>
getDataSources()
Gets the new data sources.java.util.Set<DataSource>
getOldDataSources()
Gets the previous data source listjava.util.Set<DataSource>
getRemoved()
Gets the Data Sources that have been removed from the selection.DataSet
getSource()
Gets the data set that triggered this selection event.default boolean
isNop()
Test if this event did not change anything.
-
-
-
Method Detail
-
getOldDataSources
java.util.Set<DataSource> getOldDataSources()
Gets the previous data source listThis collection cannot be modified and will not change.
- Returns:
- The old data source list
-
getDataSources
java.util.Set<DataSource> getDataSources()
Gets the new data sources. New data sources are added to the end of the collection.This collection cannot be modified and will not change.
- Returns:
- The new data sources
-
getRemoved
java.util.Set<DataSource> getRemoved()
Gets the Data Sources that have been removed from the selection.Those are the primitives contained in
getOldDataSources()
but not ingetDataSources()
This collection cannot be modified and will not change.
- Returns:
- The DataSources that were removed
-
getAdded
java.util.Set<DataSource> getAdded()
Gets the data sources that have been added to the selection.Those are the data sources contained in
getDataSources()
but not ingetOldDataSources()
This collection cannot be modified and will not change.
- Returns:
- The data sources that were added
-
getSource
DataSet getSource()
Gets the data set that triggered this selection event.- Returns:
- The data set.
-
isNop
default boolean isNop()
Test if this event did not change anything.This will return
false
for all events that are sent to listeners, so you don't need to test it.- Returns:
true
if this did not change the selection.
-
-