Package com.google.cloud.firestore
Class GeoPoint
java.lang.Object
com.google.cloud.firestore.GeoPoint
- All Implemented Interfaces:
Serializable
Immutable class representing a geographic location in Firestore
- See Also:
-
Constructor Summary
ConstructorDescriptionGeoPoint
(double latitude, double longitude) Construct a new GeoPoint using the provided latitude and longitude values. -
Method Summary
-
Constructor Details
-
GeoPoint
public GeoPoint(double latitude, double longitude) Construct a new GeoPoint using the provided latitude and longitude values.- Parameters:
latitude
- The latitude of this GeoPoint in the range [-90, 90].longitude
- The longitude of this GeoPoint in the range [-180, 180].
-
-
Method Details
-
getLatitude
public double getLatitude()Returns the latitude.- Returns:
- The latitude value of this GeoPoint.
-
getLongitude
public double getLongitude()Returns the longitude.- Returns:
- The longitude value of this GeoPoint.
-
toString
-
equals
Returns true if this GeoPoint is equal to the provided object. -
hashCode
public int hashCode()
-