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/alignways/src/com/tilusnet/josm/plugins/alignways
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysAlgnSegment.java

    r30345 r30737  
    4141
    4242    private PivotLocations currPivot;
    43     Map<PivotLocations, EastNorth> pivotList = new EnumMap<PivotLocations, EastNorth>(
     43    Map<PivotLocations, EastNorth> pivotList = new EnumMap<>(
    4444            PivotLocations.class);
    4545    private final Color pivotColor = Color.YELLOW;
    4646    private final Color crossColor = pivotColor;
    47     private final Map<Node,ArrayList<WaySegment>> adjWaySegs = new HashMap<Node,ArrayList<WaySegment>>();
     47    private final Map<Node,ArrayList<WaySegment>> adjWaySegs = new HashMap<>();
    4848
    4949    public AlignWaysAlgnSegment(MapView mapview, Point p)
     
    7070        // Update the list of adjacent waysegments to the endpoints
    7171        for (Node nA : getSegmentEndPoints()) {
    72             adjWaySegs.put(nA, new ArrayList<WaySegment>(determineAdjacentWaysegments(nA)));
     72            adjWaySegs.put(nA, new ArrayList<>(determineAdjacentWaysegments(nA)));
    7373        }
    7474    }
     
    182182     */
    183183    private Collection<WaySegment> determineAdjacentWaysegments(Node node) {
    184         Collection<WaySegment> wsSet = new HashSet<WaySegment>();
     184        Collection<WaySegment> wsSet = new HashSet<>();
    185185        final double radius = 10.0;
    186186        final int stepsOnCircle = 24;
  • applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepAngles.java

    r30631 r30737  
    7171               
    7272                // In order have a chance to align, (enAdjOther1, enAdjOther2 and endpoint) must be collinear
    73                 ArrayList<EastNorth> enAdjPts = new ArrayList<EastNorth>(3);
     73                ArrayList<EastNorth> enAdjPts = new ArrayList<>(3);
    7474                enAdjPts.add(enAdjOther1);
    7575                enAdjPts.add(endpoint.getEastNorth());
     
    154154
    155155    private boolean isEnSetCollinear(ArrayList<EastNorth> enAdjPts) {
    156         ArrayList<AlignWaysGeomPoint> awAdjPts = new ArrayList<AlignWaysGeomPoint>();
     156        ArrayList<AlignWaysGeomPoint> awAdjPts = new ArrayList<>();
    157157       
    158158        for (EastNorth en : enAdjPts) {
  • applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepLength.java

    r30345 r30737  
    5151     * Useful for validation.
    5252     */
    53     final Map<Node,EastNorth> calculatedNodes = new HashMap<Node,EastNorth>();
     53    final Map<Node,EastNorth> calculatedNodes = new HashMap<>();
    5454
    5555
     
    7373     * List of all old states of the objects.
    7474     */
    75     final Map<Node, Node> oldNodes = new HashMap<Node, Node>();
     75    final Map<Node, Node> oldNodes = new HashMap<>();
    7676
    7777    /**
     
    148148
    149149        // "Backup" state
    150         lastAffectedNodes = new HashSet<Node>();
     150        lastAffectedNodes = new HashSet<>();
    151151        for (Node n : this.displaceableNodes) {
    152152            Node nodeBackup = new Node(n);
  • applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysSegment.java

    r30345 r30737  
    5757            Node node2 = segment.way.getNode(segment.lowerIndex + 1);
    5858
    59             segmentEndPoints = new HashSet<Node>();
     59            segmentEndPoints = new HashSet<>();
    6060            segmentEndPoints.add(node1);
    6161            segmentEndPoints.add(node2);
  • applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/geometry/AlignWaysGeomPoint.java

    r30345 r30737  
    9999       
    100100        Double[] dValues = {d1, d2, d3};
    101         ArrayList<Double> alValues = new ArrayList<Double>(Arrays.asList(dValues));
     101        ArrayList<Double> alValues = new ArrayList<>(Arrays.asList(dValues));
    102102        Collections.sort(alValues);
    103103       
Note: See TracChangeset for help on using the changeset viewer.