@@ -49,7 +49,7 @@ public ParseGeoPoint() {
4949
5050 /**
5151 * Creates a new point with the specified latitude and longitude.
52- *
52+ *
5353 * @param latitude
5454 * The point's latitude.
5555 * @param longitude
@@ -96,7 +96,7 @@ protected ParseGeoPoint(Parcel source) {
9696
9797 /**
9898 * Set latitude. Valid range is (-90.0, 90.0). Extremes should not be used.
99- *
99+ *
100100 * @param latitude
101101 * The point's latitude.
102102 */
@@ -116,7 +116,7 @@ public double getLatitude() {
116116
117117 /**
118118 * Set longitude. Valid range is (-180.0, 180.0). Extremes should not be used.
119- *
119+ *
120120 * @param longitude
121121 * The point's longitude.
122122 */
@@ -137,7 +137,7 @@ public double getLongitude() {
137137 /**
138138 * Get distance in radians between this point and another {@code ParseGeoPoint}. This is the
139139 * smallest angular distance between the two points.
140- *
140+ *
141141 * @param point
142142 * {@code ParseGeoPoint} describing the other point being measured against.
143143 */
@@ -162,7 +162,7 @@ public double distanceInRadiansTo(ParseGeoPoint point) {
162162
163163 /**
164164 * Get distance between this point and another {@code ParseGeoPoint} in kilometers.
165- *
165+ *
166166 * @param point
167167 * {@code ParseGeoPoint} describing the other point being measured against.
168168 */
@@ -172,7 +172,7 @@ public double distanceInKilometersTo(ParseGeoPoint point) {
172172
173173 /**
174174 * Get distance between this point and another {@code ParseGeoPoint} in kilometers.
175- *
175+ *
176176 * @param point
177177 * {@code ParseGeoPoint} describing the other point being measured against.
178178 */
@@ -274,7 +274,7 @@ public ParseGeoPoint then(Task<Location> task) throws Exception {
274274 * times for a fix.
275275 * * For better battery efficiency and faster location fixes, you can set
276276 * {@link Criteria#setPowerRequirement(int)}, however, this will result in lower accuracy.
277- *
277+ *
278278 * @param timeout
279279 * The number of milliseconds to allow before timing out.
280280 * @param criteria
@@ -290,6 +290,18 @@ public static void getCurrentLocationInBackground(long timeout, Criteria criteri
290290 ParseTaskUtils .callbackOnMainThreadAsync (getCurrentLocationInBackground (timeout , criteria ), callback );
291291 }
292292
293+ @ Override
294+ public boolean equals (Object obj ) {
295+ if (obj == null || !(obj instanceof ParseGeoPoint )) {
296+ return false ;
297+ }
298+ if (obj == this ) {
299+ return true ;
300+ }
301+ return ((ParseGeoPoint ) obj ).getLatitude () == latitude &&
302+ ((ParseGeoPoint ) obj ).getLongitude () == longitude ;
303+ }
304+
293305 @ Override
294306 public String toString () {
295307 return String .format (Locale .US , "ParseGeoPoint[%.6f,%.6f]" , latitude , longitude );
0 commit comments