Changeset 748 in josm for trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
- Timestamp:
- 2008-08-06T08:49:51+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
r655 r748 13 13 import org.openstreetmap.josm.data.coor.LatLon; 14 14 15 public class WayPoint extends WithAttributes implements Comparable {16 15 public class WayPoint extends WithAttributes implements Comparable<WayPoint> 16 { 17 17 public final LatLon latlon; 18 18 public final EastNorth eastNorth; … … 23 23 24 24 public WayPoint(LatLon ll) { 25 latlon = ll; 25 latlon = ll; 26 26 eastNorth = Main.proj.latlon2eastNorth(ll); 27 27 } … … 49 49 } 50 50 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 } 58 55 }
Note:
See TracChangeset
for help on using the changeset viewer.