public class GeoPoint implements SerializableImmutable class representing a geographic location in Firestore
Implements
SerializableConstructors
GeoPoint(double latitude, double longitude)
public GeoPoint(double latitude, double longitude)Construct a new GeoPoint using the provided latitude and longitude values.
| Parameters | |
|---|---|
| Name | Description |
latitude |
doubleThe latitude of this GeoPoint in the range [-90, 90]. |
longitude |
doubleThe longitude of this GeoPoint in the range [-180, 180]. |
Methods
equals(Object obj)
public boolean equals(Object obj)Returns true if this GeoPoint is equal to the provided object.
| Parameter | |
|---|---|
| Name | Description |
obj |
ObjectThe object to compare against. |
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether this GeoPoint is equal to the provided object. |
getLatitude()
public double getLatitude()Returns the latitude.
| Returns | |
|---|---|
| Type | Description |
double |
The latitude value of this GeoPoint. |
getLongitude()
public double getLongitude()Returns the longitude.
| Returns | |
|---|---|
| Type | Description |
double |
The longitude value of this GeoPoint. |
hashCode()
public int hashCode()| Returns | |
|---|---|
| Type | Description |
int |
|
toString()
public String toString()| Returns | |
|---|---|
| Type | Description |
String |
|