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 Details

    • latitude

      T latitude(double lat)
      Sets the latitude.
      Parameters:
      lat - Latitude, in degrees.
      Returns:
      itself
    • longitude

      T longitude(double lng)
      Sets the longitude.
      Parameters:
      lng - Longitude, in degrees.
      Returns:
      itself
    • elevation

      T elevation(double h)
      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

      default T elevationFt(double ft)
      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 default T height(double h)
      Deprecated.
      Use elevation(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 default T heightFt(double ft)
      Deprecated.
      Use elevationFt(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

      default T at(double lat, double lng)
      Sets the geolocation.
      Parameters:
      lat - Latitude, in degrees.
      lng - Longitude, in degrees.
      Returns:
      itself
    • at

      default T at(double[] coords)
      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

      default T latitude(int d, int m, double s)
      Sets the latitude.
      Parameters:
      d - Degrees
      m - Minutes
      s - Seconds (and fraction of seconds)
      Returns:
      itself
    • longitude

      default T longitude(int d, int m, double s)
      Sets the longitude.
      Parameters:
      d - Degrees
      m - Minutes
      s - Seconds (and fraction of seconds)
      Returns:
      itself
    • sameLocationAs

      Uses the same location as given in the LocationParameter at this moment.

      Changes to the source parameter will not affect this parameter, though.

      Parameters:
      l - LocationParameter to be used.
      Returns:
      itself