Changeset 7005 in josm for trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.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/CreateMultipolygonAction.java
r6913 r7005 174 174 return selectedRelations.iterator().next(); 175 175 } else { 176 final HashSet<Relation> relatedRelations = new HashSet< Relation>();176 final HashSet<Relation> relatedRelations = new HashSet<>(); 177 177 for (final Way w : selectedWays) { 178 178 relatedRelations.addAll(Utils.filteredCollection(w.getReferrers(), Relation.class)); … … 188 188 189 189 // add ways of existing relation to include them in polygon analysis 190 Set<Way> ways = new HashSet< Way>(selectedWays);190 Set<Way> ways = new HashSet<>(selectedWays); 191 191 ways.addAll(selectedMultipolygonRelation.getMemberPrimitives(Way.class)); 192 192 … … 303 303 private static void addMembers(JoinedPolygon polygon, Relation rel, String role) { 304 304 final int count = rel.getMembersCount(); 305 final HashSet<Way> ways = new HashSet< Way>(polygon.ways);305 final HashSet<Way> ways = new HashSet<>(polygon.ways); 306 306 for (int i = 0; i < count; i++) { 307 307 final RelationMember m = rel.getMember(i); … … 325 325 */ 326 326 public static List<Command> removeTagsFromWaysIfNeeded( Relation relation ) { 327 Map<String, String> values = new HashMap< String, String>(relation.getKeys());328 329 List<Way> innerWays = new ArrayList< Way>();330 List<Way> outerWays = new ArrayList< Way>();331 332 Set<String> conflictingKeys = new TreeSet< String>();327 Map<String, String> values = new HashMap<>(relation.getKeys()); 328 329 List<Way> innerWays = new ArrayList<>(); 330 List<Way> outerWays = new ArrayList<>(); 331 332 Set<String> conflictingKeys = new TreeSet<>(); 333 333 334 334 for( RelationMember m : relation.getMembers() ) { … … 371 371 values.put("area", "yes"); 372 372 373 List<Command> commands = new ArrayList< Command>();373 List<Command> commands = new ArrayList<>(); 374 374 boolean moveTags = Main.pref.getBoolean("multipoly.movetags", true); 375 375 376 376 for (Entry<String, String> entry : values.entrySet()) { 377 List<OsmPrimitive> affectedWays = new ArrayList< OsmPrimitive>();377 List<OsmPrimitive> affectedWays = new ArrayList<>(); 378 378 String key = entry.getKey(); 379 379 String value = entry.getValue();
Note:
See TracChangeset
for help on using the changeset viewer.