Changeset 2327 in josm for trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java
- Timestamp:
- 27.10.2009 01:21:32 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java
r1169 r2327 45 45 } 46 46 47 @Override 48 public int hashCode() { 49 final int prime = 31; 50 int result = super.hashCode(); 51 long temp; 52 temp = java.lang.Double.doubleToLongBits(x); 53 result = prime * result + (int) (temp ^ (temp >>> 32)); 54 temp = java.lang.Double.doubleToLongBits(y); 55 result = prime * result + (int) (temp ^ (temp >>> 32)); 56 return result; 57 } 58 59 @Override 60 public boolean equals(Object obj) { 61 if (this == obj) 62 return true; 63 if (!super.equals(obj)) 64 return false; 65 if (getClass() != obj.getClass()) 66 return false; 67 Coordinate other = (Coordinate) obj; 68 if (java.lang.Double.doubleToLongBits(x) != java.lang.Double.doubleToLongBits(other.x)) 69 return false; 70 if (java.lang.Double.doubleToLongBits(y) != java.lang.Double.doubleToLongBits(other.y)) 71 return false; 72 return true; 73 } 47 74 }
Note: See TracChangeset
for help on using the changeset viewer.
