Package org.openstreetmap.josm.actions
Class SelectNonBranchingWaySequences
java.lang.Object
org.openstreetmap.josm.actions.SelectNonBranchingWaySequences
Auxiliary class for the
SelectNonBranchingWaySequencesAction.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a way selection -
Method Summary
Modifier and TypeMethodDescriptionprivate voidAdd a way endpoint to nodes, outerNodesprivate voidAdd the endpoints of the way to nodes, outerNodesbooleanFind out if the selection can be extendedvoidExtend the current selectionprivate WayfindWay(Collection<OsmPrimitive> selection) Finds out if the current selection can be extended.private static WayfindWay(Collection<OsmPrimitive> selection, Node node) Finds out if the current selection can be extended.
-
Field Details
-
outerNodes
outer endpoints of selected ways -
nodes
endpoints of selected ways
-
-
Constructor Details
-
SelectNonBranchingWaySequences
Creates a way selection- Parameters:
ways- selection a selection of ways
-
-
Method Details
-
addNodes
Add a way endpoint to nodes, outerNodes- Parameters:
node- a way endpoint
-
addNodes
Add the endpoints of the way to nodes, outerNodes- Parameters:
way- a way whose endpoints are added
-
canExtend
Find out if the selection can be extended- Returns:
- true if the selection can be extended
-
findWay
Finds out if the current selection can be extended.- Parameters:
selection- current selection (ways and others)node- perimeter node from which to extend the selection- Returns:
- a way by which to extend the selection, or null
-
findWay
Finds out if the current selection can be extended.The members outerNodes, nodes must have been initialized. How to update these members when extending the selection, @see extend().
- Parameters:
selection- current selection- Returns:
- a way by which to extend the selection, or null
-
extend
Extend the current selection- Parameters:
data- the data set in which to extend the selection
-