Package com.azure.core.models
Class GeoPosition
- java.lang.Object
-
- com.azure.core.models.GeoPosition
-
public final class GeoPosition extends Object
Represents a geo position.
-
-
Constructor Summary
Constructors Constructor Description GeoPosition(double longitude, double latitude)
Constructs a geo position.GeoPosition(double longitude, double latitude, Double altitude)
Constructs a geo position.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
count()
Gets the number of coordinates used to compose the position.boolean
equals(Object obj)
Double
getAltitude()
The altitude of the geometric position.double
getLatitude()
The latitudinal position of the geometric position.double
getLongitude()
The longitudinal position of the geometric position.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
GeoPosition
public GeoPosition(double longitude, double latitude)
Constructs a geo position.- Parameters:
longitude
- Longitudinal position.latitude
- Latitudinal position.
-
GeoPosition
public GeoPosition(double longitude, double latitude, Double altitude)
Constructs a geo position.- Parameters:
longitude
- Longitudinal position.latitude
- Latitudinal position.altitude
- Altitude position.
-
-
Method Detail
-
getLongitude
public double getLongitude()
The longitudinal position of the geometric position.- Returns:
- The longitudinal position.
-
getLatitude
public double getLatitude()
The latitudinal position of the geometric position.- Returns:
- The latitudinal position.
-
getAltitude
public Double getAltitude()
The altitude of the geometric position.- Returns:
- The altitude.
-
count
public int count()
Gets the number of coordinates used to compose the position.This will return either 2 or 3 depending on whether
altitude is set
.- Returns:
- The number of coordinates used to compose the position.
-
-