Ignore:
Timestamp:
2014-04-26T17:39:23+02:00 (10 years ago)
Author:
Don-vip
Message:

see #8465 - use diamond operator where applicable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/MultipolygonCreate.java

    r6841 r7005  
    4949         */
    5050        private List<Node> getNodes() {
    51             List<Node> nodes = new ArrayList<Node>();
     51            List<Node> nodes = new ArrayList<>();
    5252
    5353            for(int waypos = 0; waypos < this.ways.size(); waypos ++) {
     
    8585            this.outerWay = _pol;
    8686            this.level = _level;
    87             this.innerWays = new ArrayList<JoinedPolygon>();
     87            this.innerWays = new ArrayList<>();
    8888        }
    8989    }
     
    9898
    9999    public MultipolygonCreate(){
    100         this.outerWays = new ArrayList<JoinedPolygon>(0);
    101         this.innerWays = new ArrayList<JoinedPolygon>(0);
     100        this.outerWays = new ArrayList<>(0);
     101        this.innerWays = new ArrayList<>(0);
    102102    }
    103103
     
    109109     */
    110110    public String makeFromWays(Collection<Way> ways){
    111         List<JoinedPolygon> joinedWays = new ArrayList<JoinedPolygon>();
     111        List<JoinedPolygon> joinedWays = new ArrayList<>();
    112112
    113113        //collect ways connecting to each node.
    114         MultiMap<Node, Way> nodesWithConnectedWays = new MultiMap<Node, Way>();
    115         Set<Way> usedWays = new HashSet<Way>();
     114        MultiMap<Node, Way> nodesWithConnectedWays = new MultiMap<>();
     115        Set<Way> usedWays = new HashSet<>();
    116116
    117117        for(Way w: ways) {
     
    139139
    140140            Node startNode = startWay.firstNode();
    141             List<Way> collectedWays = new ArrayList<Way>();
    142             List<Boolean> collectedWaysReverse = new ArrayList<Boolean>();
     141            List<Way> collectedWays = new ArrayList<>();
     142            List<Boolean> collectedWaysReverse = new ArrayList<>();
    143143            Way curWay = startWay;
    144144            Node prevNode = startNode;
     
    197197        }
    198198
    199         this.outerWays = new ArrayList<JoinedPolygon>(0);
    200         this.innerWays = new ArrayList<JoinedPolygon>(0);
     199        this.outerWays = new ArrayList<>(0);
     200        this.innerWays = new ArrayList<>(0);
    201201
    202202        //take every other level
     
    221221
    222222        //TODO: bad performance for deep nesting...
    223         List<PolygonLevel> result = new ArrayList<PolygonLevel>();
     223        List<PolygonLevel> result = new ArrayList<>();
    224224
    225225        for (JoinedPolygon outerWay : boundaryWays) {
    226226
    227227            boolean outerGood = true;
    228             List<JoinedPolygon> innerCandidates = new ArrayList<JoinedPolygon>();
     228            List<JoinedPolygon> innerCandidates = new ArrayList<>();
    229229
    230230            for (JoinedPolygon innerWay : boundaryWays) {
Note: See TracChangeset for help on using the changeset viewer.