Changeset 30737 in osm for applications/editors/josm/plugins/routing
- Timestamp:
- 2014-10-18T23:07:52+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/routing/src/com/innovant/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java
r30361 r30737 160 160 161 161 logger.debug("Creating Graph..."); 162 graph = new DirectedWeightedMultigraph< Node, OsmEdge>(OsmEdge.class);162 graph = new DirectedWeightedMultigraph<>(OsmEdge.class); 163 163 rgDelegator=new RoutingGraphDelegator(graph); 164 164 rgDelegator.setRouteType(this.routeType); … … 347 347 */ 348 348 public List<OsmEdge> applyAlgorithm(List<Node> nodes, Algorithm algorithm) { 349 List<OsmEdge> path = new ArrayList< OsmEdge>();349 List<OsmEdge> path = new ArrayList<>(); 350 350 Graph<Node,OsmEdge> g; 351 351 double totalWeight = 0; … … 370 370 DijkstraShortestPath<Node, OsmEdge> routingk = null; 371 371 for (int index = 1; index < nodes.size(); ++index) { 372 routingk = new DijkstraShortestPath< Node, OsmEdge>(g, nodes372 routingk = new DijkstraShortestPath<>(g, nodes 373 373 .get(index - 1), nodes.get(index)); 374 374 if (routingk.getPathEdgeList() == null) { -
applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingProfile.java
r15707 r30737 75 75 logger.debug("Init RoutingProfile with name: "+name); 76 76 this.name = name; 77 waySpeeds=new HashMap< String,Double>();77 waySpeeds=new HashMap<>(); 78 78 Map<String,String> prefs=Main.pref.getAllPrefix("routing.profile."+name+".speed"); 79 79 for(String key:prefs.keySet()){ -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingLayer.java
r30361 r30737 191 191 @Override 192 192 public Action[] getMenuEntries() { 193 Collection<Action> components = new ArrayList< Action>();193 Collection<Action> components = new ArrayList<>(); 194 194 components.add(LayerListDialog.getInstance().createShowHideLayerAction()); 195 195 // components.add(new JMenuItem(new LayerListDialog.ShowHideMarkerText(this))); -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingModel.java
r30361 r30737 79 79 */ 80 80 public RoutingModel(DataSet data) { 81 nodes = new ArrayList< Node>();81 nodes = new ArrayList<>(); 82 82 System.out.println("gr " + data); 83 83 routingGraph = new RoutingGraph(data); … … 128 128 */ 129 129 public void reverseNodes() { 130 List<Node> aux = new ArrayList< Node>();130 List<Node> aux = new ArrayList<>(); 131 131 for (Node n : nodes) { 132 132 aux.add(0,n); -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingPlugin.java
r30361 r30737 148 148 preferenceSettings=new RoutingPreferenceDialog(); 149 149 // Initialize layers list 150 layers = new ArrayList< RoutingLayer>();150 layers = new ArrayList<>(); 151 151 // Add menu 152 152 menu = new RoutingMenu();
Note:
See TracChangeset
for help on using the changeset viewer.