Class LongLatPosition

java.lang.Object
org.sm.smtools.math.LongLatPosition

public final class LongLatPosition extends Object
The LongLatPosition class provides a data container for a (longitude,latitude) position.

Note that this class cannot be subclassed!

Version:
06/07/2022
Author:
Sven Maerivoet
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a LongLatPosition object with zero-coordinates.
    LongLatPosition(double longitude, double latitude)
    Constructs a LongLatPosition object with the specified (longitude,latitude) coordinates.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Gets the position's latitude.
    double
    Gets the position's longitude.
    void
    setLatitude(double latitude)
    Sets the position's latitude.
    void
    setLongitude(double longitude)
    Sets the position's longitude.

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LongLatPosition

      public LongLatPosition(double longitude, double latitude)
      Constructs a LongLatPosition object with the specified (longitude,latitude) coordinates.
      Parameters:
      longitude - -
      latitude - -
    • LongLatPosition

      public LongLatPosition()
      Constructs a LongLatPosition object with zero-coordinates.
  • Method Details

    • getLongitude

      public double getLongitude()
      Gets the position's longitude.
      Returns:
      the position's longitude
    • setLongitude

      public void setLongitude(double longitude)
      Sets the position's longitude.
      Parameters:
      longitude - -
    • getLatitude

      public double getLatitude()
      Gets the position's latitude.
      Returns:
      the position's latitude
    • setLatitude

      public void setLatitude(double latitude)
      Sets the position's latitude.
      Parameters:
      latitude - -