Class Location

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class Location
    extends Object
    implements Serializable, Cloneable

    Represents a latitude and longitude pair, expressed in geographic coordinate system degrees (for example 47.6204, -122.3491).

    Elevation is currently not supported.

    See Also:
    Serialized Form
    • Constructor Detail

      • Location

        public Location()
    • Method Detail

      • setLatitude

        public void setLatitude​(Double latitude)

        The latitude.

        Parameters:
        latitude - The latitude.
      • getLatitude

        public Double getLatitude()

        The latitude.

        Returns:
        The latitude.
      • withLatitude

        public Location withLatitude​(Double latitude)

        The latitude.

        Parameters:
        latitude - The latitude.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setLongitude

        public void setLongitude​(Double longitude)

        The longitude.

        Parameters:
        longitude - The longitude.
      • getLongitude

        public Double getLongitude()

        The longitude.

        Returns:
        The longitude.
      • withLongitude

        public Location withLongitude​(Double longitude)

        The longitude.

        Parameters:
        longitude - The longitude.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • toString

        public String toString()
        Returns a string representation of this object; useful for testing and debugging.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object