Class GeoPt

    • Constructor Detail

      • GeoPt

        public GeoPt​(float latitude,
                     float longitude)
        Constructs a GeoPt.
        Parameters:
        latitude - The latitude. Must be between -90 and 90 (inclusive).
        longitude - The longitude. Must be between -180 and 180 (inclusive).
        Throws:
        IllegalArgumentException - If latitude or longitude is outside the legal range.
    • Method Detail

      • getLatitude

        public float getLatitude()
      • getLongitude

        public float getLongitude()
      • compareTo

        public int compareTo​(GeoPt o)
        Sort first by latitude, then by longitude
        Specified by:
        compareTo in interface Comparable<GeoPt>
      • equals

        public boolean equals​(@Nullable Object o)
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object