Class SelectNonBranchingWaySequences

java.lang.Object
org.openstreetmap.josm.actions.SelectNonBranchingWaySequences

Auxiliary class for the SelectNonBranchingWaySequencesAction.
  • Field Details

    • outerNodes

      private final Set<Node> outerNodes
      outer endpoints of selected ways
    • nodes

      private final Set<Node> nodes
      endpoints of selected ways
  • Constructor Details

  • Method Details

    • addNodes

      private void addNodes(Node node)
      Add a way endpoint to nodes, outerNodes
      Parameters:
      node - a way endpoint
    • addNodes

      private void addNodes(Way way)
      Add the endpoints of the way to nodes, outerNodes
      Parameters:
      way - a way whose endpoints are added
    • canExtend

      public boolean canExtend()
      Find out if the selection can be extended
      Returns:
      true if the selection can be extended
    • findWay

      private static Way findWay(Collection<OsmPrimitive> selection, Node node)
      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

      private Way findWay(Collection<OsmPrimitive> selection)
      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

      public void extend(DataSet data)
      Extend the current selection
      Parameters:
      data - the data set in which to extend the selection