Interface IDataSelectionListener.SelectionChangeEvent<O extends IPrimitive,N extends INode,W extends IWay<N>,R extends IRelation<?>,D extends OsmData<O,N,W,R>>
-
- 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 Known Implementing Classes:
IDataSelectionListener.AbstractSelectionEvent
,IDataSelectionListener.SelectionAddEvent
,IDataSelectionListener.SelectionRemoveEvent
,IDataSelectionListener.SelectionReplaceEvent
,IDataSelectionListener.SelectionToggleEvent
- 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 interface IDataSelectionListener.SelectionChangeEvent<O extends IPrimitive,N extends INode,W extends IWay<N>,R extends IRelation<?>,D extends OsmData<O,N,W,R>>
The event that is fired when the selection changed.- Since:
- 17862 (generics)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Set<O>
getAdded()
Gets the primitives that have been added to the selection.Set<O>
getOldSelection()
Gets the previous selectionSet<O>
getRemoved()
Gets the primitives that have been removed from the selection.Set<O>
getSelection()
Gets the new selection.D
getSource()
Gets the data set that triggered this selection event.default boolean
isNop()
Test if this event did not change anything.
-
-
-
Method Detail
-
getOldSelection
Set<O> getOldSelection()
Gets the previous selectionThis collection cannot be modified and will not change.
- Returns:
- The old selection
-
getSelection
Set<O> getSelection()
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
Set<O> getRemoved()
Gets the primitives that have been removed from the selection.Those are the primitives contained in
getOldSelection()
but not ingetSelection()
This collection cannot be modified and will not change.
- Returns:
- The primitives that were removed
-
getAdded
Set<O> getAdded()
Gets the primitives that have been added to the selection.Those are the primitives contained in
getSelection()
but not ingetOldSelection()
This collection cannot be modified and will not change.
- Returns:
- The primitives that were added
-
getSource
D getSource()
Gets the data set that triggered this selection event.- Returns:
- The data set.
-
isNop
default boolean isNop()
Test if this event did not change anything.This will return
false
for all events that are sent to listeners, so you don't need to test it.- Returns:
true
if this did not change the selection.
-
-