Class GeoPoint (3.15.7)

public class GeoPoint implements Serializable

Immutable class representing a geographic location in Firestore

Inheritance

Object > GeoPoint

Implements

Serializable

Constructors

GeoPoint(double latitude, double longitude)

public GeoPoint(double latitude, double longitude)

Construct a new GeoPoint using the provided latitude and longitude values.

Parameters
NameDescription
latitudedouble

The latitude of this GeoPoint in the range [-90, 90].

longitudedouble

The 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
NameDescription
objObject

The object to compare against.

Returns
TypeDescription
boolean

Whether this GeoPoint is equal to the provided object.

Overrides

getLatitude()

public double getLatitude()

Returns the latitude.

Returns
TypeDescription
double

The latitude value of this GeoPoint.

getLongitude()

public double getLongitude()

Returns the longitude.

Returns
TypeDescription
double

The longitude value of this GeoPoint.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

toString()

public String toString()
Returns
TypeDescription
String
Overrides