Interface LocationParameter<T>
- Type Parameters:
T
- Type of the final builder
- All Known Subinterfaces:
MoonIllumination.Parameters
,MoonPosition.Parameters
,MoonTimes.Parameters
,SunPosition.Parameters
,SunTimes.Parameters
- All Known Implementing Classes:
BaseBuilder
public interface LocationParameter<T>
Location based parameters.
Use them to give information about the geolocation of the observer. If ommitted, the coordinates of Null Island are used.
-
Method Summary
Modifier and TypeMethodDescriptiondefault T
at
(double[] coords) Sets the geolocation.default T
at
(double lat, double lng) Sets the geolocation.elevation
(double h) Sets the elevation.default T
elevationFt
(double ft) Sets the elevation, in foot.default T
height
(double h) Deprecated.default T
heightFt
(double ft) Deprecated.UseelevationFt(double)
instead.latitude
(double lat) Sets the latitude.default T
latitude
(int d, int m, double s) Sets the latitude.longitude
(double lng) Sets the longitude.default T
longitude
(int d, int m, double s) Sets the longitude.Uses the same location as given in theLocationParameter
at this moment.
-
Method Details
-
latitude
Sets the latitude.- Parameters:
lat
- Latitude, in degrees.- Returns:
- itself
-
longitude
Sets the longitude.- Parameters:
lng
- Longitude, in degrees.- Returns:
- itself
-
elevation
Sets the elevation.- Parameters:
h
- Elevation, in meters above sea level. Default: 0.0 m. Negative values are silently changed to the acceptable minimum of 0.0 m.- Returns:
- itself
- Since:
- 3.9
- See Also:
-
elevationFt
Sets the elevation, in foot.- Parameters:
ft
- Elevation, in foot above sea level. Default: 0.0 ft. Negative values are silently changed to the acceptable minimum of 0.0 ft.- Returns:
- itself
- Since:
- 3.9
- See Also:
-
height
Deprecated.Useelevation(double)
instead.Sets the height.- Parameters:
h
- Height, in meters above sea level. Default: 0.0 m. Negative values are silently changed to the acceptable minimum of 0.0 m.- Returns:
- itself
-
heightFt
Deprecated.UseelevationFt(double)
instead.Sets the height, in foot.- Parameters:
ft
- Height, in foot above sea level. Default: 0.0 ft. Negative values are silently changed to the acceptable minimum of 0.0 ft.- Returns:
- itself
- Since:
- 3.8
-
at
Sets the geolocation.- Parameters:
lat
- Latitude, in degrees.lng
- Longitude, in degrees.- Returns:
- itself
-
at
Sets the geolocation. In the given array, index 0 must contain the latitude, and index 1 must contain the longitude. An optional index 2 may contain the elevation, in meters.This call is meant to be used for coordinates stored in constants.
- Parameters:
coords
- Array containing the latitude and longitude, in degrees.- Returns:
- itself
-
latitude
Sets the latitude.- Parameters:
d
- Degreesm
- Minutess
- Seconds (and fraction of seconds)- Returns:
- itself
-
longitude
Sets the longitude.- Parameters:
d
- Degreesm
- Minutess
- Seconds (and fraction of seconds)- Returns:
- itself
-
sameLocationAs
Uses the same location as given in theLocationParameter
at this moment.Changes to the source parameter will not affect this parameter, though.
- Parameters:
l
-LocationParameter
to be used.- Returns:
- itself
-
elevation(double)
instead.