@Test public void testHashCode() { assertEquals(a.hashCode(), a.hashCode()); assertEquals(a.hashCode(), b.hashCode()); assertFalse(a.hashCode() == c.hashCode()); assertFalse(d.hashCode() == c.hashCode()); assertFalse(d.hashCode() == new Integer(10).hashCode()); }
@Override public int hashCode() { int result = 42; long latBits = Double.doubleToLongBits(latitude); long lonBits = Double.doubleToLongBits(longitude); result = 31 * result + (int) (latBits ^ (latBits >>> 32)); result = 31 * result + (int) (lonBits ^ (lonBits >>> 32)); return result; }
WGS84Point implements Serializable { @Override public int hashCode() { int result = 42; long latBits = Double.doubleToLongBits(latitude); long lonBits = Double.doubleToLongBits(longitude); result = 31 * result + (int) (latBits ^ (latBits >>> 32)); result = 31 * result + (int) (lonBits ^ (lonBits >>> 32)); return result; } }
WGS84Point implements Serializable { @Override public int hashCode() { int result = 42; long latBits = Double.doubleToLongBits(latitude); long lonBits = Double.doubleToLongBits(longitude); result = 31 * result + (int) (latBits ^ (latBits >>> 32)); result = 31 * result + (int) (lonBits ^ (lonBits >>> 32)); return result; } WGS84Point(double latitude, double longitude);  WGS84Point(WGS84Point other); }
WGS84Point implements Serializable { @Override public int hashCode() { int result = 42; long latBits = Double.doubleToLongBits(latitude); long lonBits = Double.doubleToLongBits(longitude); result = 31 * result + (int) (latBits ^ (latBits >>> 32)); result = 31 * result + (int) (lonBits ^ (lonBits >>> 32)); return result; } WGS84Point(double latitude, double longitude);  WGS84Point(WGS84Point other); double getLatitude(); double getLongitude(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); }
WGS84Point implements Serializable { @Override public int hashCode() { int result = 42; long latBits = Double.doubleToLongBits(latitude); long lonBits = Double.doubleToLongBits(longitude); result = 31 * result + (int) (latBits ^ (latBits >>> 32)); result = 31 * result + (int) (lonBits ^ (lonBits >>> 32)); return result; } WGS84Point(double latitude, double longitude);  WGS84Point(WGS84Point other); double getLatitude(); double getLongitude(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }