Class LunarTime.Builder

java.lang.Object
net.time4j.calendar.astro.LunarTime.Builder
Enclosing class:
LunarTime

public static class LunarTime.Builder extends Object

Helper class to construct a new instance of LunarTime.

Since:
3.38/4.33
Author:
Meno Hochschild
  • Method Details

    • northernLatitude

      public LunarTime.Builder northernLatitude(int degrees, int minutes, double seconds)

      Sets the northern latitude in degrees, arc minutes and arc seconds.

      Parameters:
      degrees - degrees in range 0 <= x <= 90
      minutes - arc minutes in range 0 <= x < 60
      seconds - arc seconds in range 0.0 <= x < 60.0
      Returns:
      this instance for method chaining
      Throws:
      IllegalArgumentException - if any parameter is out of range
      IllegalStateException - if the latitude has already been set
      See Also:
      southernLatitude(int, int, double)
    • southernLatitude

      public LunarTime.Builder southernLatitude(int degrees, int minutes, double seconds)

      Sets the southern latitude in degrees, arc minutes and arc seconds.

      Parameters:
      degrees - degrees in range 0 <= x <= 90
      minutes - arc minutes in range 0 <= x < 60
      seconds - arc seconds in range 0.0 <= x < 60.0
      Returns:
      this instance for method chaining
      Throws:
      IllegalArgumentException - if any parameter is out of range
      IllegalStateException - if the latitude has already been set
      See Also:
      northernLatitude(int, int, double)
    • easternLongitude

      public LunarTime.Builder easternLongitude(int degrees, int minutes, double seconds)

      Sets the eastern longitude in degrees, arc minutes and arc seconds.

      Parameters:
      degrees - degrees in range 0 <= x < 180
      minutes - arc minutes in range 0 <= x < 60
      seconds - arc seconds in range 0.0 <= x < 60.0
      Returns:
      this instance for method chaining
      Throws:
      IllegalArgumentException - if any parameter is out of range
      IllegalStateException - if the longitude has already been set
      See Also:
      westernLongitude(int, int, double)
    • westernLongitude

      public LunarTime.Builder westernLongitude(int degrees, int minutes, double seconds)

      Sets the western longitude in degrees, arc minutes and arc seconds.

      Parameters:
      degrees - degrees in range 0 <= x <= 180
      minutes - arc minutes in range 0 <= x < 60
      seconds - arc seconds in range 0.0 <= x < 60.0
      Returns:
      this instance for method chaining
      Throws:
      IllegalArgumentException - if any parameter is out of range
      IllegalStateException - if the longitude has already been set
      See Also:
      easternLongitude(int, int, double)
    • atAltitude

      public LunarTime.Builder atAltitude(int altitude)

      Sets the altitude in meters.

      The altitude is used to model a geodetic correction as well as a refraction correction based on the simple assumption of a standard atmosphere. Users should keep in mind that the local topology with mountains breaking the horizon line and special weather conditions cannot be taken into account. If this method is not called then a default altitude of zero is assumed.

      Parameters:
      altitude - geographical altitude relative to sea level in meters (0 <= x < 11,0000)
      Returns:
      this instance for method chaining
      Throws:
      IllegalArgumentException - if the argument is not finite or out of range
    • build

      public LunarTime build()

      Finishes the build-process.

      Returns:
      new configured instance of LunarTime
      Throws:
      IllegalStateException - if either latitude or longitude have not yet been set
      IllegalArgumentException - if the observer timezone cannot be loaded