Class GeoLocation


  • public class GeoLocation
    extends Object
    Represents a GeoLocation
    • Constructor Detail

      • GeoLocation

        public GeoLocation​(BigDecimal latitude,
                           BigDecimal longitude)
        Create a GeoLocation
        Parameters:
        latitude - The latitude of the geolocation
        longitude - The longitude of the geolocation
      • GeoLocation

        public GeoLocation​(String latitude,
                           String longitude)
        Create a GeoLocation
        Parameters:
        latitude - The latitude of the geolocation
        longitude - 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 [latitude, longitude]
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getLatitude

        public BigDecimal getLatitude()
        The latitude of the GeoLocation
        Returns:
        The latitude
      • getLongitude

        public BigDecimal getLongitude()
        The longitude of the GeoLocation
        Returns:
        The longitude