Package org.sm.smtools.math
Class LatLongPosition
java.lang.Object
org.sm.smtools.math.LatLongPosition
public final class LatLongPosition
extends java.lang.Object
The
LatLongPosition
class provides a data container for a (latitude,longitude) position.
Note that this class cannot be subclassed!
- Version:
- 04/09/2019
- Author:
- Sven Maerivoet
-
Constructor Summary
Constructors Constructor Description LatLongPosition()
Constructs aLatLongPosition
object with zero-coordinates.LatLongPosition(double latitude, double longitude)
Constructs aLatLongPosition
object with the specified (latitude,longitude) coordinates. -
Method Summary
Modifier and Type Method Description double
getLatitude()
Gets the position's latitude.double
getLongitude()
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
-
LatLongPosition
public LatLongPosition(double latitude, double longitude)Constructs aLatLongPosition
object with the specified (latitude,longitude) coordinates.- Parameters:
latitude
- -longitude
- -
-
LatLongPosition
public LatLongPosition()Constructs aLatLongPosition
object with zero-coordinates.
-
-
Method Details
-
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
- -
-
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
- -
-