java.lang.Object
com.gluonhq.attach.position.Position
A class that contains the latitude and longitude coordinates that map to a
specific point location on earth.
- Since:
- 3.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal doubleReturn the altitude of the position, above mean sea level, in meters.final doubleReturn the latitude coordinate of the position.final doubleReturn the longitude coordinate of the position.toString()
-
Constructor Details
-
Position
public Position(double latitude, double longitude) Construct a new position with the specifiedlatitudeandlongitude. It sets thealtitudeas 0.0.- Parameters:
latitude- the latitude coordinate of the new positionlongitude- the longitude coordinate of the new position
-
Position
public Position(double latitude, double longitude, double altitude) Construct a new position with the specifiedlatitude,longitudeandaltitude.- Parameters:
latitude- the latitude coordinate of the new positionlongitude- the longitude coordinate of the new positionaltitude- the altitude of the new position
-
-
Method Details
-
getLatitude
public final double getLatitude()Return the latitude coordinate of the position.- Returns:
- a double representing the latitude coordinate
-
getLongitude
public final double getLongitude()Return the longitude coordinate of the position.- Returns:
- a double representing the longitude coordinate
-
getAltitude
public final double getAltitude()Return the altitude of the position, above mean sea level, in meters.- Returns:
- a double representing the altitude in meters
-
toString
-