public class SelectNonBranchingWaySequences extends java.lang.Object
SelectNonBranchingWaySequencesAction
.Modifier and Type | Field and Description |
---|---|
(package private) java.util.Set<Node> |
nodes
endpoints of selected ways
|
(package private) java.util.Set<Node> |
outerNodes
outer endpoints of selected ways
|
Constructor and Description |
---|
SelectNonBranchingWaySequences(java.util.Collection<Way> ways)
Creates a way selection
|
Modifier and Type | Method and Description |
---|---|
private void |
addNodes(Node node)
Add a way endpoint to nodes, outerNodes
|
private void |
addNodes(Way way)
Add the endpoints of the way to nodes, outerNodes
|
boolean |
canExtend()
Find out if the selection can be extended
|
void |
extend(DataSet data)
Extend the current selection
|
private Way |
findWay(java.util.Collection<OsmPrimitive> selection)
Finds out if the current selection can be extended.
|
private static Way |
findWay(java.util.Collection<OsmPrimitive> selection,
Node node)
Finds out if the current selection can be extended.
|
java.util.Set<Node> outerNodes
public SelectNonBranchingWaySequences(java.util.Collection<Way> ways)
ways
- selection a selection of waysprivate void addNodes(Node node)
node
- a way endpointprivate void addNodes(Way way)
way
- a way whose endpoints are addedpublic boolean canExtend()
private static Way findWay(java.util.Collection<OsmPrimitive> selection, Node node)
selection
- current selection (ways and others)node
- perimeter node from which to extend the selectionprivate Way findWay(java.util.Collection<OsmPrimitive> selection)
The members outerNodes, nodes must have been initialized. How to update these members when extending the selection, @see extend().
selection
- current selection