]> gitweb.fperrin.net Git - GpsPrune.git/commitdiff
wip viewfinder srtm-multi-sources-viewfinder
authorFrédéric Perrin <fred@fperrin.net>
Sun, 1 Dec 2019 22:19:52 +0000 (22:19 +0000)
committerFrédéric Perrin <fred@fperrin.net>
Sun, 1 Dec 2019 22:19:52 +0000 (22:19 +0000)
src/tim/prune/function/srtm/SrtmTile.java

index 62e2ba10ffb9e66bfa58eaa7324bf049650daafb..69e8537b7fc39d4631fa682de5de996aa08ad110 100644 (file)
@@ -41,9 +41,15 @@ public class SrtmTile
         * @param inOther other tile object
         * @return true if both represent same tile
         */
-       public boolean equals(SrtmTile inOther)
+       public boolean equals(Object inOther)
        {
-               return (_latitude == inOther._latitude) && (_longitude == inOther._longitude);
+               if (! (inOther instanceof SrtmTile))
+               {
+                       return false;
+               }
+               SrtmTile otherTile = (SrtmTile) inOther;
+               return (_latitude == otherTile._latitude) &&
+                       (_longitude == otherTile._longitude);
        }
 
        public int hashCode()