Class DataSourceAddedEvent
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.AbstractDataSourceChangeEvent
-
- org.openstreetmap.josm.data.osm.event.DataSourceAddedEvent
-
- All Implemented Interfaces:
DataSourceChangeEvent
public class DataSourceAddedEvent extends AbstractDataSourceChangeEvent
There is a new data source- Since:
- 15609
-
-
Field Summary
Fields Modifier and Type Field Description private Set<DataSource>
added
private Set<DataSource>
current
private Set<DataSource>
removed
-
Constructor Summary
Constructors Constructor Description DataSourceAddedEvent(DataSet source, Set<DataSource> old, Stream<DataSource> newDataSources)
Create a Data Source change event
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<DataSource>
getAdded()
Gets the data sources that have been added to the selection.Set<DataSource>
getDataSources()
Gets the new data sources.Set<DataSource>
getRemoved()
Gets the Data Sources that have been removed from the selection.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 Set<DataSource> current
-
removed
private Set<DataSource> removed
-
added
private final Set<DataSource> added
-
-
Constructor Detail
-
DataSourceAddedEvent
public DataSourceAddedEvent(DataSet source, Set<DataSource> old, Stream<DataSource> newDataSources)
Create a Data Source change event- Parameters:
source
- The DataSet that is originating the changeold
- The previous set of DataSourcesnewDataSources
- The data sources that are being added
-
-
Method Detail
-
getDataSources
public 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 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 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
-
-