Package com.couchbase.client.java.util
Class Coordinate
java.lang.Object
com.couchbase.client.java.util.Coordinate
public class Coordinate extends Object
A coordinate is a tuple of a latitude and a longitude.
If you need to construct a coordinate, use the ofLonLat(double, double)
static method.
-
Method Summary
Modifier and Type Method Description double
lat()
Returns the latitude of this coordinate.double
lon()
Returns the longitude of this coordinate.static Coordinate
ofLonLat(double lon, double lat)
Creates a newCoordinate
with a longitude and a latitude.
-
Method Details
-
ofLonLat
Creates a newCoordinate
with a longitude and a latitude.- Parameters:
lon
- the longitude of the coordinate.lat
- the latitude of the coordinate.- Returns:
- a new
Coordinate
.
-
lon
public double lon()Returns the longitude of this coordinate. -
lat
public double lat()Returns the latitude of this coordinate.
-