Changeset 7005 in josm for trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
- Timestamp:
- 2014-04-26T17:39:23+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
r6814 r7005 47 47 Node node = selectedNodes.iterator().next(); 48 48 49 Collection<Command> cmds = new LinkedList< Command>();49 Collection<Command> cmds = new LinkedList<>(); 50 50 51 51 // If the user has selected some ways, only join the node to these. … … 55 55 List<WaySegment> wss = Main.map.mapView.getNearestWaySegments( 56 56 Main.map.mapView.getPoint(node), OsmPrimitive.isSelectablePredicate); 57 HashMap<Way, List<Integer>> insertPoints = new HashMap< Way, List<Integer>>();57 HashMap<Way, List<Integer>> insertPoints = new HashMap<>(); 58 58 for (WaySegment ws : wss) { 59 59 // Maybe cleaner to pass a "isSelected" predicate to getNearestWaySegments, but this is less invasive. … … 66 66 is = insertPoints.get(ws.way); 67 67 } else { 68 is = new ArrayList< Integer>();68 is = new ArrayList<>(); 69 69 insertPoints.put(ws.way, is); 70 70 } … … 98 98 99 99 private static void pruneSuccsAndReverse(List<Integer> is) { 100 HashSet<Integer> is2 = new HashSet< Integer>();100 HashSet<Integer> is2 = new HashSet<>(); 101 101 for (int i : is) { 102 102 if (!is2.contains(i - 1) && !is2.contains(i + 1)) {
Note:
See TracChangeset
for help on using the changeset viewer.