Changeset 30737 in osm for applications/editors/josm/plugins/terracer/src
- Timestamp:
- 2014-10-18T23:07:52+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/terracer/src/terracer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java
r30643 r30737 366 366 */ 367 367 TreeSet<String> createAutoCompletionInfo() { 368 final TreeSet<String> names = new TreeSet< String>();368 final TreeSet<String> names = new TreeSet<>(); 369 369 for (OsmPrimitive osm : Main.main.getCurrentDataSet() 370 370 .allNonDeletedPrimitives()) { -
applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java
r30612 r30737 55 55 // Set to keep track of all the nodes that have been visited - that is: if 56 56 // we encounter them again we will not follow onto the connected ways. 57 HashSet<Node> visitedNodes = new HashSet< Node>();57 HashSet<Node> visitedNodes = new HashSet<>(); 58 58 59 59 // Set to keep track of the ways the algorithm has seen, but not yet visited. 60 60 // Since when a way is visited all of its nodes are marked as visited, there 61 61 // is no need to keep a visitedWays set. 62 HashSet<Way> front = new HashSet< Way>();62 HashSet<Way> front = new HashSet<>(); 63 63 64 64 // Find the first or last way from the teracced houses. … … 85 85 86 86 // This is like a visitedWays set, but in a linear order. 87 LinkedList<Way> orderedWays = new LinkedList< Way>();87 LinkedList<Way> orderedWays = new LinkedList<>(); 88 88 89 89 // And the tags to reverse on the orderedWays. 90 LinkedList<String> houseNumbers = new LinkedList< String>();90 LinkedList<String> houseNumbers = new LinkedList<>(); 91 91 92 92 while (front.size() > 0) { … … 114 114 } 115 115 116 Collection<Command> commands = new LinkedList< Command>();116 Collection<Command> commands = new LinkedList<>(); 117 117 for (int i = 0; i < orderedWays.size(); ++i) { 118 118 commands.add(new ChangePropertyCommand( -
applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java
r30614 r30737 82 82 83 83 protected static final Set<Relation> findAssociatedStreets(Collection<OsmPrimitive> objects) { 84 Set<Relation> result = new HashSet< Relation>();84 Set<Relation> result = new HashSet<>(); 85 85 if (objects != null) { 86 86 for (OsmPrimitive c : objects) { … … 113 113 Way street = null; 114 114 String streetname = null; 115 ArrayList<Node> housenumbers = new ArrayList< Node>();115 ArrayList<Node> housenumbers = new ArrayList<>(); 116 116 Node init = null; 117 117 … … 361 361 // This list will contain nodes of the outline that are used in new lines. 362 362 // These nodes will not be deleted with the outline (if deleting was prompted). 363 ArrayList<Node> reused_nodes = new ArrayList< Node>();364 365 this.commands = new LinkedList< Command>();366 Collection<Way> ways = new LinkedList< Way>();363 ArrayList<Node> reused_nodes = new ArrayList<>(); 364 365 this.commands = new LinkedList<>(); 366 Collection<Way> ways = new LinkedList<>(); 367 367 368 368 if (nb > 1) { … … 401 401 // Delete outline nodes having no tags and referrers but the outline itself 402 402 List<Node> nodes = outline.getNodes(); 403 ArrayList<Node> nodesToDelete = new ArrayList< Node>();403 ArrayList<Node> nodesToDelete = new ArrayList<>(); 404 404 for (Node n : nodes) 405 405 if (!n.hasKeys() && n.getReferrers().size() == 1 && !reused_nodes.contains(n)) … … 462 462 tagsInConflict, primitives, Collections.singleton(outline)); 463 463 if (!conflictCommands.isEmpty()) { 464 List<Command> newCommands = new ArrayList< Command>(commands);464 List<Command> newCommands = new ArrayList<>(commands); 465 465 newCommands.addAll(conflictCommands); 466 466 setSequence(newCommands.toArray(new Command[0])); … … 638 638 } 639 639 640 return new Pair< Way, Way>(front, back);640 return new Pair<>(front, back); 641 641 } 642 642 … … 700 700 701 701 final int length = a.length; 702 ArrayList<SortWithIndex> sortable = new ArrayList< SortWithIndex>(length);702 ArrayList<SortWithIndex> sortable = new ArrayList<>(length); 703 703 for (int i = 0; i < length; ++i) { 704 704 sortable.add(new SortWithIndex(a[i], i));
Note:
See TracChangeset
for help on using the changeset viewer.