Ignore:
Timestamp:
2008-08-06T08:49:51+02:00 (16 years ago)
Author:
stoecker
Message:

some cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java

    r655 r748  
    1313import org.openstreetmap.josm.data.coor.LatLon;
    1414
    15 public class WayPoint extends WithAttributes implements Comparable{
    16        
     15public class WayPoint extends WithAttributes implements Comparable<WayPoint>
     16{
    1717        public final LatLon latlon;
    1818        public final EastNorth eastNorth;
     
    2323
    2424        public WayPoint(LatLon ll) {
    25                 latlon = ll; 
     25                latlon = ll;
    2626                eastNorth = Main.proj.latlon2eastNorth(ll);
    2727        }
     
    4949        }
    5050
    51     public int compareTo(Object other){
    52         if(other instanceof WayPoint){
    53             WayPoint w = (WayPoint)other;
    54             return (int)time - (int)w.time;
    55         }
    56         return 0;
    57     }
     51        public int compareTo(WayPoint w)
     52        {
     53                return Double.compare(time, w.time);
     54        }
    5855}
Note: See TracChangeset for help on using the changeset viewer.