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 java.util.Set<DataSource>
added
private java.util.Set<DataSource>
current
private java.util.Set<DataSource>
removed
-
Constructor Summary
Constructors Constructor Description DataSourceAddedEvent(DataSet source, java.util.Set<DataSource> old, java.util.stream.Stream<DataSource> newDataSources)
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 java.util.Set<DataSource> removed
-
added
private final java.util.Set<DataSource> added
-
-
Constructor Detail
-
DataSourceAddedEvent
public DataSourceAddedEvent(DataSet source, java.util.Set<DataSource> old, java.util.stream.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 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
-
-