Ignore:
Timestamp:
2014-10-18T23:07:52+02:00 (10 years ago)
Author:
donvip
Message:

[josm_plugins] fix Java 7 / unused code warnings

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  
    160160
    161161        logger.debug("Creating Graph...");
    162         graph = new DirectedWeightedMultigraph<Node, OsmEdge>(OsmEdge.class);
     162        graph = new DirectedWeightedMultigraph<>(OsmEdge.class);
    163163        rgDelegator=new RoutingGraphDelegator(graph);
    164164        rgDelegator.setRouteType(this.routeType);
     
    347347     */
    348348    public List<OsmEdge> applyAlgorithm(List<Node> nodes, Algorithm algorithm) {
    349         List<OsmEdge> path = new ArrayList<OsmEdge>();
     349        List<OsmEdge> path = new ArrayList<>();
    350350        Graph<Node,OsmEdge> g;
    351351        double totalWeight = 0;
     
    370370            DijkstraShortestPath<Node, OsmEdge> routingk = null;
    371371            for (int index = 1; index < nodes.size(); ++index) {
    372                 routingk = new DijkstraShortestPath<Node, OsmEdge>(g, nodes
     372                routingk = new DijkstraShortestPath<>(g, nodes
    373373                        .get(index - 1), nodes.get(index));
    374374                if (routingk.getPathEdgeList() == null) {
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingProfile.java

    r15707 r30737  
    7575        logger.debug("Init RoutingProfile with name: "+name);
    7676        this.name = name;
    77         waySpeeds=new HashMap<String,Double>();
     77        waySpeeds=new HashMap<>();
    7878        Map<String,String> prefs=Main.pref.getAllPrefix("routing.profile."+name+".speed");
    7979        for(String key:prefs.keySet()){
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingLayer.java

    r30361 r30737  
    191191    @Override
    192192    public Action[] getMenuEntries() {
    193         Collection<Action> components = new ArrayList<Action>();
     193        Collection<Action> components = new ArrayList<>();
    194194        components.add(LayerListDialog.getInstance().createShowHideLayerAction());
    195195//        components.add(new JMenuItem(new LayerListDialog.ShowHideMarkerText(this)));
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingModel.java

    r30361 r30737  
    7979     */
    8080    public RoutingModel(DataSet data) {
    81         nodes = new ArrayList<Node>();
     81        nodes = new ArrayList<>();
    8282        System.out.println("gr " + data);
    8383        routingGraph = new RoutingGraph(data);
     
    128128     */
    129129    public void reverseNodes() {
    130         List<Node> aux = new ArrayList<Node>();
     130        List<Node> aux = new ArrayList<>();
    131131        for (Node n : nodes) {
    132132            aux.add(0,n);
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingPlugin.java

    r30361 r30737  
    148148        preferenceSettings=new RoutingPreferenceDialog();
    149149        // Initialize layers list
    150         layers = new ArrayList<RoutingLayer>();
     150        layers = new ArrayList<>();
    151151        // Add menu
    152152        menu = new RoutingMenu();
Note: See TracChangeset for help on using the changeset viewer.