Changeset 7005 in josm for trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java
- Timestamp:
- 2014-04-26T17:39:23+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java
r6937 r7005 111 111 112 112 private void testWrongRoundabout(Way w) { 113 Map<String, List<Way>> map = new HashMap< String, List<Way>>();113 Map<String, List<Way>> map = new HashMap<>(); 114 114 // Count all highways (per type) connected to this roundabout, except links 115 115 // As roundabouts are closed ways, take care of not processing the first/last node twice 116 for (Node n : new HashSet< Node>(w.getNodes())) {116 for (Node n : new HashSet<>(w.getNodes())) { 117 117 for (Way h : Utils.filteredCollection(n.getReferrers(), Way.class)) { 118 118 String value = h.get("highway"); … … 120 120 List<Way> list = map.get(value); 121 121 if (list == null) { 122 map.put(value, list = new ArrayList< Way>());122 map.put(value, list = new ArrayList<>()); 123 123 } 124 124 list.add(h); … … 150 150 } 151 151 152 final HashSet<OsmPrimitive> referrers = new HashSet< OsmPrimitive>();152 final HashSet<OsmPrimitive> referrers = new HashSet<>(); 153 153 referrers.addAll(way.firstNode().getReferrers()); 154 154 referrers.addAll(way.lastNode().getReferrers());
Note:
See TracChangeset
for help on using the changeset viewer.
