Changeset 9375 in josm for trunk/src/org
- Timestamp:
- 2016-01-10T00:40:31+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/coor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java
r9372 r9375 3 3 4 4 import java.io.Serializable; 5 import java.util.Objects; 5 6 6 7 import org.openstreetmap.josm.data.osm.BBox; … … 113 114 } 114 115 116 @Override 117 public int hashCode() { 118 return Objects.hash(x, y); 119 } 120 121 @Override 122 public boolean equals(Object obj) { 123 if (this == obj) return true; 124 if (obj == null || getClass() != obj.getClass()) return false; 125 Coordinate that = (Coordinate) obj; 126 return Double.compare(that.x, x) == 0 && 127 Double.compare(that.y, y) == 0; 128 } 115 129 } -
trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r9371 r9375 429 429 @Override 430 430 public int hashCode() { 431 return Objects.hash( super.hashCode());431 return Objects.hash(x, y); 432 432 } 433 433 … … 436 436 if (this == obj) return true; 437 437 if (obj == null || getClass() != obj.getClass()) return false; 438 return super.equals(obj); 438 LatLon that = (LatLon) obj; 439 return Double.compare(that.x, x) == 0 && 440 Double.compare(that.y, y) == 0; 439 441 } 440 442
Note:
See TracChangeset
for help on using the changeset viewer.