Class IDataSelectionListener.SelectionReplaceEvent<O extends IPrimitive,N extends INode,W extends IWay<N>,R extends IRelation<?>,D extends OsmData<O,N,W,R>>
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.event.IDataSelectionListener.AbstractSelectionEvent<O,N,W,R,D>
-
- org.openstreetmap.josm.data.osm.event.IDataSelectionListener.SelectionReplaceEvent<O,N,W,R,D>
-
- Type Parameters:
O
- the base type of OSM primitivesN
- type representing OSM nodesW
- type representing OSM waysR
- type representing OSM relationsD
- The dataset type
- All Implemented Interfaces:
IDataSelectionListener.SelectionChangeEvent<O,N,W,R,D>
- Enclosing interface:
- IDataSelectionListener<O extends IPrimitive,N extends INode,W extends IWay<N>,R extends IRelation<?>,D extends OsmData<O,N,W,R>>
public static class IDataSelectionListener.SelectionReplaceEvent<O extends IPrimitive,N extends INode,W extends IWay<N>,R extends IRelation<?>,D extends OsmData<O,N,W,R>> extends IDataSelectionListener.AbstractSelectionEvent<O,N,W,R,D>
The selection is replaced by a new selection- Since:
- 17862 (generics)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<O>
getAdded()
Gets the primitives that have been added to the selection.Set<O>
getRemoved()
Gets the primitives that have been removed from the selection.Set<O>
getSelection()
Gets the new selection.String
toString()
-
Methods inherited from class org.openstreetmap.josm.data.osm.event.IDataSelectionListener.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.event.IDataSelectionListener.SelectionChangeEvent
isNop
-
-
-
-
Field Detail
-
current
private final Set<O extends IPrimitive> current
-
removed
private Set<O extends IPrimitive> removed
-
added
private Set<O extends IPrimitive> added
-
-
Constructor Detail
-
SelectionReplaceEvent
public SelectionReplaceEvent(D source, Set<O> old, Stream<O> newSelection)
- Parameters:
source
- The source datasetold
- The old primitives that were previously selected. The caller needs to ensure that this set is not modified.newSelection
- The primitives of the new selection.
-
-
Method Detail
-
getSelection
public Set<O> getSelection()
Description copied from interface:IDataSelectionListener.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 Set<O> getRemoved()
Description copied from interface:IDataSelectionListener.SelectionChangeEvent
Gets the primitives that have been removed from the selection.Those are the primitives contained in
IDataSelectionListener.SelectionChangeEvent.getOldSelection()
but not inIDataSelectionListener.SelectionChangeEvent.getSelection()
This collection cannot be modified and will not change.
- Returns:
- The primitives that were removed
-
getAdded
public Set<O> getAdded()
Description copied from interface:IDataSelectionListener.SelectionChangeEvent
Gets the primitives that have been added to the selection.Those are the primitives contained in
IDataSelectionListener.SelectionChangeEvent.getSelection()
but not inIDataSelectionListener.SelectionChangeEvent.getOldSelection()
This collection cannot be modified and will not change.
- Returns:
- The primitives that were added
-
-