Changeset 14659 in josm


Ignore:
Timestamp:
2019-01-07T03:08:44+01:00 (2 weeks ago)
Author:
Don-vip
Message:

fix tests broken since r14654

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java

    r14654 r14659  
    77import java.awt.event.ActionEvent;
    88import java.awt.event.KeyEvent;
    9 import java.io.Serializable;
    109import java.util.ArrayList;
    1110import java.util.Collection;
    1211import java.util.Collections;
    13 import java.util.Comparator;
    1412import java.util.LinkedList;
    1513import java.util.List;
     
    103101     * Class designed to create a couple between a node and its angle relative to the center of the circle.
    104102     */
    105     private static class PolarNode {
     103    private static class PolarNode implements Comparable<PolarNode> {
    106104        private final double a;
    107105        private final Node node;
     
    111109            this.node = n;
    112110        }
    113     }
    114 
    115     /**
    116      * Comparator used to order PolarNode relative to their angle.
    117      */
    118     private static class PolarNodeComparator implements Comparator<PolarNode>, Serializable {
    119         private static final long serialVersionUID = 1L;
    120111
    121112        @Override
    122         public int compare(PolarNode pc1, PolarNode pc2) {
    123             return Double.compare(pc1.a, pc2.a);
     113        public int compareTo(PolarNode o) {
     114            return Double.compare(a, o.a);
    124115        }
    125116    }
Note: See TracChangeset for help on using the changeset viewer.