Class DataSourceRemovedEvent
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.AbstractDataSourceChangeEvent
-
- org.openstreetmap.josm.data.osm.event.DataSourceRemovedEvent
-
- All Implemented Interfaces:
DataSourceChangeEvent
public class DataSourceRemovedEvent extends AbstractDataSourceChangeEvent
A data source was removed- Since:
- 15609
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<DataSource>
added
private java.util.Set<DataSource>
current
private java.util.Set<DataSource>
removed
-
Constructor Summary
Constructors Constructor Description DataSourceRemovedEvent(DataSet source, java.util.Set<DataSource> old, java.util.stream.Stream<DataSource> removedDataSources)
Create a Data Source change event
-
Method Summary
All Methods Instance Methods Concrete 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>
getRemoved()
Gets the Data Sources that have been removed from the selection.java.lang.String
toString()
-
Methods inherited from class org.openstreetmap.josm.data.osm.AbstractDataSourceChangeEvent
getOldDataSources, getSource
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.data.osm.DataSourceChangeEvent
isNop
-
-
-
-
Field Detail
-
current
private java.util.Set<DataSource> current
-
removed
private final java.util.Set<DataSource> removed
-
added
private java.util.Set<DataSource> added
-
-
Constructor Detail
-
DataSourceRemovedEvent
public DataSourceRemovedEvent(DataSet source, java.util.Set<DataSource> old, java.util.stream.Stream<DataSource> removedDataSources)
Create a Data Source change event- Parameters:
source
- The DataSet that is originating the changeold
- The previous set of DataSourcesremovedDataSources
- The data sources that are being removed
-
-
Method Detail
-
getDataSources
public java.util.Set<DataSource> getDataSources()
Description copied from interface:DataSourceChangeEvent
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
public java.util.Set<DataSource> getRemoved()
Description copied from interface:DataSourceChangeEvent
Gets the Data Sources that have been removed from the selection.Those are the primitives contained in
DataSourceChangeEvent.getOldDataSources()
but not inDataSourceChangeEvent.getDataSources()
This collection cannot be modified and will not change.
- Returns:
- The DataSources that were removed
-
getAdded
public java.util.Set<DataSource> getAdded()
Description copied from interface:DataSourceChangeEvent
Gets the data sources that have been added to the selection.Those are the data sources contained in
DataSourceChangeEvent.getDataSources()
but not inDataSourceChangeEvent.getOldDataSources()
This collection cannot be modified and will not change.
- Returns:
- The data sources that were added
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-