Class ParallelWays

    • Constructor Detail

      • ParallelWays

        public ParallelWays​(java.util.Collection<Way> sourceWays,
                            boolean copyTags,
                            int refWayIndex)
        Constructs a new ParallelWays.
        Parameters:
        sourceWays - source ways
        copyTags - whether tags should be copied
        refWayIndex - Need a reference way to determine the direction of the offset when we manage multiple ways
    • Method Detail

      • copyNodeInMap

        private static void copyNodeInMap​(java.util.Map<Node,​Node> splitNodeMap,
                                          Node node,
                                          boolean copyTags)
      • isClosedPath

        public boolean isClosedPath()
        Determines if the nodes graph form a closed path
        Returns:
        true if the nodes graph form a closed path
      • changeOffset

        public void changeOffset​(double d)
        Offsets the way(s) d units. Positive d means to the left (relative to the reference way)
        Parameters:
        d - offset
      • commit

        public void commit()
        Performs the action by adding a new sequence command to the undo/redo queue.
      • getWays

        public final java.util.List<WaygetWays()
        Returns the resulting parallel ways.
        Returns:
        the resulting parallel ways