Class Geolocation
- java.lang.Object
-
- co.elasticsearch.enterprisesearch.client.model.Geolocation
-
public class Geolocation extends Object
Represents a Geolocation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeolocation.UnitRepresents a Geolocation Unit of measurement
-
Constructor Summary
Constructors Constructor Description Geolocation(String center)Create a GeolocationGeolocation(String latitude, String longitude)Create a GeolocationGeolocation(BigDecimal latitude, BigDecimal longitude)Create a Geolocation
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)BigDecimal[]getCenter()The center point of the Geolocation objectBigDecimalgetLatitude()The latitude of the GeolocationBigDecimalgetLongitude()The longitude of the GeolocationinthashCode()StringtoString()
-
-
-
Constructor Detail
-
Geolocation
public Geolocation(BigDecimal latitude, BigDecimal longitude)
Create a Geolocation- Parameters:
latitude- The latitude of the geolocationlongitude- The longitude of the geolocation
-
Geolocation
public Geolocation(String latitude, String longitude)
Create a Geolocation- Parameters:
latitude- The latitude of the geolocationlongitude- The longitude of the geolocation
-
Geolocation
public Geolocation(String center)
Create a Geolocation- Parameters:
center- The string representation of the Geolocation. It must be either latitude, longitude or wellknown format
-
-
Method Detail
-
getCenter
public BigDecimal[] getCenter()
The center point of the Geolocation object- Returns:
- An array of [longitude, latitude]
-
getLatitude
public BigDecimal getLatitude()
The latitude of the Geolocation- Returns:
- The latitude
-
getLongitude
public BigDecimal getLongitude()
The longitude of the Geolocation- Returns:
- The longitude
-
-