Package org.openstreetmap.josm.data.osm
Class DataSelectionListener.SelectionAddEvent
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.DataSelectionListener.AbstractSelectionEvent
-
- org.openstreetmap.josm.data.osm.DataSelectionListener.SelectionAddEvent
-
- All Implemented Interfaces:
DataSelectionListener.SelectionChangeEvent
- Enclosing interface:
- DataSelectionListener
public static class DataSelectionListener.SelectionAddEvent extends DataSelectionListener.AbstractSelectionEvent
Primitives are added to the selection- Since:
- 12048
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<OsmPrimitive>
add
private java.util.Set<OsmPrimitive>
current
-
Constructor Summary
Constructors Constructor Description SelectionAddEvent(DataSet source, java.util.Set<OsmPrimitive> old, java.util.stream.Stream<OsmPrimitive> toAdd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<OsmPrimitive>
getAdded()
Gets the primitives that have been added to the selection.java.util.Set<OsmPrimitive>
getRemoved()
Gets the primitives that have been removed from the selection.java.util.Set<OsmPrimitive>
getSelection()
Gets the new selection.java.lang.String
toString()
-
Methods inherited from class org.openstreetmap.josm.data.osm.DataSelectionListener.AbstractSelectionEvent
getOldSelection, 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.DataSelectionListener.SelectionChangeEvent
isNop
-
-
-
-
Field Detail
-
add
private final java.util.Set<OsmPrimitive> add
-
current
private final java.util.Set<OsmPrimitive> current
-
-
Constructor Detail
-
SelectionAddEvent
public SelectionAddEvent(DataSet source, java.util.Set<OsmPrimitive> old, java.util.stream.Stream<OsmPrimitive> toAdd)
- Parameters:
source
- The source datasetold
- The old primitives that were previously selected. The caller needs to ensure that this set is not modified.toAdd
- The primitives to add.
-
-
Method Detail
-
getSelection
public java.util.Set<OsmPrimitive> getSelection()
Description copied from interface:DataSelectionListener.SelectionChangeEvent
Gets the new selection. New elements are added to the end of the collection.This collection cannot be modified and will not change.
- Returns:
- The new selection
-
getRemoved
public java.util.Set<OsmPrimitive> getRemoved()
Description copied from interface:DataSelectionListener.SelectionChangeEvent
Gets the primitives that have been removed from the selection.Those are the primitives contained in
DataSelectionListener.SelectionChangeEvent.getOldSelection()
but not inDataSelectionListener.SelectionChangeEvent.getSelection()
This collection cannot be modified and will not change.
- Returns:
- The primitives that were removed
-
getAdded
public java.util.Set<OsmPrimitive> getAdded()
Description copied from interface:DataSelectionListener.SelectionChangeEvent
Gets the primitives that have been added to the selection.Those are the primitives contained in
DataSelectionListener.SelectionChangeEvent.getSelection()
but not inDataSelectionListener.SelectionChangeEvent.getOldSelection()
This collection cannot be modified and will not change.
- Returns:
- The primitives that were added
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-