X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=src%2Ftim%2Fprune%2Ffunction%2Fsrtm%2FSrtmTile.java;fp=src%2Ftim%2Fprune%2Ffunction%2Fsrtm%2FSrtmTile.java;h=69e8537b7fc39d4631fa682de5de996aa08ad110;hb=7abebda5c89c2e2d885a64a94c8172ff1662a76b;hp=62e2ba10ffb9e66bfa58eaa7324bf049650daafb;hpb=2c77855cfb5ff50825996091360098634d1d75ed;p=GpsPrune.git diff --git a/src/tim/prune/function/srtm/SrtmTile.java b/src/tim/prune/function/srtm/SrtmTile.java index 62e2ba1..69e8537 100644 --- a/src/tim/prune/function/srtm/SrtmTile.java +++ b/src/tim/prune/function/srtm/SrtmTile.java @@ -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()