java.lang.Object
io.jenetics.jpx.format.Location
Aggregation of the three location components: latitude, longitude and
elevation.
- Since:
- 1.4
- Version:
- 2.2
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturn the elevation ofthislocation.booleaninthashCode()latitude()Return the latitude ofthislocation.Return the longitude ofthislocation.static LocationCreate a new location object from the givenlatitude.static LocationCreate a new location object from the givenlatitudeandlongitude.static LocationCreate a new location object from the givenlatitude,longitudeandelevation.static LocationCreate a new location object from the givenelevation.static LocationCreate a new location object from the givenlongitude.static LocationCreate a new location form the given GPS point.toPoint()Return a newPointfromthislocation.toString()
-
Method Details
-
latitude
Return the latitude ofthislocation.- Returns:
- the latitude of
thislocation, orOptional.empty()if not available
-
longitude
Return the longitude ofthislocation.- Returns:
- the longitude of
thislocation, orOptional.empty()if not available
-
elevation
Return the elevation ofthislocation.- Returns:
- the elevation of
thislocation, orOptional.empty()if not available
-
toPoint
Return a newPointfromthislocation. If thelatitude()or thelongitude()is not given,Optional.empty()is returned- Returns:
- a new
Pointif the latitude and longitude is given,Optional.empty()otherwise
-
hashCode
-
equals
-
toString
-
of
Create a new location form the given GPS point.- Parameters:
point- the GPS point- Returns:
- a new location form the given GPS point
- Throws:
NullPointerException- if the givenpointisnull
-
of
Create a new location object from the givenlatitude,longitudeandelevation.- Parameters:
latitude- the latitude of the location, maybenulllongitude- the longitude of the location, maybenullelevation- the elevation if the location, maybenull- Returns:
- a new location object from the given input data
-
of
Create a new location object from the givenlatitudeandlongitude.- Parameters:
latitude- the latitude of the location, maybenulllongitude- the longitude of the location, maybenull- Returns:
- a new location object from the given input data
-
of
Create a new location object from the givenlatitude.- Parameters:
latitude- the latitude of the location, maybenull- Returns:
- a new location object from the given input data
-
of
Create a new location object from the givenlongitude.- Parameters:
longitude- the longitude of the location, maybenull- Returns:
- a new location object from the given input data
-
of
Create a new location object from the givenelevation.- Parameters:
elevation- the elevation of the location, maybenull- Returns:
- a new location object from the given input data
-