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 [longitude, latitude]
      • 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