Changeset 11815 in josm


Ignore:
Timestamp:
2017-04-01T02:22:13+02:00 (7 months ago)
Author:
Don-vip
Message:

sonar - squid:S3398 - "private" methods called only by inner classes should be moved to those classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java

    r11798 r11815  
    246246            return new WMTSDefaultLayer(selectedLayer.identifier, selectedLayer.tileMatrixSet.identifier);
    247247        }
     248
     249        private static List<Entry<String, List<Layer>>> groupLayersByNameAndTileMatrixSet(Collection<Layer> layers) {
     250            Map<String, List<Layer>> layerByName = layers.stream().collect(
     251                    Collectors.groupingBy(x -> x.identifier + '\u001c' + x.tileMatrixSet.identifier));
     252            return layerByName.entrySet().stream().sorted(Map.Entry.comparingByKey()).collect(Collectors.toList());
     253        }
    248254    }
    249255
     
    258264
    259265    private final WMTSDefaultLayer defaultLayer;
    260 
    261266
    262267    /**
     
    313318        matcher.appendTail(output);
    314319        return output.toString();
    315     }
    316 
    317     private static List<Entry<String, List<Layer>>> groupLayersByNameAndTileMatrixSet(Collection<Layer> layers) {
    318         Map<String, List<Layer>> layerByName = layers.stream().collect(
    319                 Collectors.groupingBy(x -> x.identifier + '\u001c' + x.tileMatrixSet.identifier));
    320         return layerByName.entrySet().stream().sorted(Map.Entry.comparingByKey()).collect(Collectors.toList());
    321320    }
    322321
Note: See TracChangeset for help on using the changeset viewer.