Location { @Override public int hashCode() { int result; long temp; temp = Double.doubleToLongBits(latitude); result = (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(longitude); result = 31 * result + (int) (temp ^ (temp >>> 32)); return result; } Location();  Location(double latitude, double longitude);  Location(Location location); static Location fromDegrees(double latitudeDegrees, double longitudeDegrees); static Location fromRadians(double latitudeRadians, double longitudeRadians); static Location fromTimeZone(TimeZone timeZone); static double normalizeLatitude(double degrees); static double normalizeLongitude(double degrees); static double clampLatitude(double degrees); static double clampLongitude(double degrees); static boolean locationsCrossAntimeridian(List<? extends Location> locations); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); Location set(double latitude, double longitude); Location set(Location location); Location interpolateAlongPath(Location endLocation, @WorldWind.PathType int pathType, double amount,
                                         Location result); double greatCircleAzimuth(Location location); double greatCircleDistance(Location location); Location greatCircleLocation(double azimuthDegrees, double distanceRadians, Location result); double rhumbAzimuth(Location location); double rhumbDistance(Location location); Location rhumbLocation(double azimuthDegrees, double distanceRadians, Location result); double linearAzimuth(Location location); double linearDistance(Location location); Location linearLocation(double azimuthDegrees, double distanceRadians, Location result); public double latitude; public double longitude; }
@Test public void testHashCode() throws Exception { Location lax = Location.fromRadians(0.592539, -2.066470); Location jfk = Location.fromRadians(0.709185, -1.287762); int laxHash = lax.hashCode(); int jfkHash = jfk.hashCode(); assertNotEquals("jfk hash vs lax hash", jfkHash, laxHash); }