Enum Class AstronomicalSeason

java.lang.Object
java.lang.Enum<AstronomicalSeason>
net.time4j.calendar.astro.AstronomicalSeason
All Implemented Interfaces:
Serializable, Comparable<AstronomicalSeason>, java.lang.constant.Constable

public enum AstronomicalSeason extends Enum<AstronomicalSeason>

The four astronomical seasons (Spring, Summer, Autumn and Winter).

If there is no context information then Time4J will assume that any season is related to the northern hemisphere.

Since:
3.33/4.28
Author:
Meno Hochschild
  • Enum Constant Details

    • VERNAL_EQUINOX

      public static final AstronomicalSeason VERNAL_EQUINOX

      Begin of Spring on the northern hemisphere in March (or Autumn on the southern hemisphere).

    • SUMMER_SOLSTICE

      public static final AstronomicalSeason SUMMER_SOLSTICE

      Begin of Summer on the northern hemisphere in June (or Winter on the southern hemisphere).

    • AUTUMNAL_EQUINOX

      public static final AstronomicalSeason AUTUMNAL_EQUINOX

      Begin of Autumn on the northern hemisphere in September (or Spring on the southern hemisphere).

    • WINTER_SOLSTICE

      public static final AstronomicalSeason WINTER_SOLSTICE

      Begin of Winter on the northern hemisphere in December (or Summer on the southern hemisphere).

  • Method Details

    • values

      public static AstronomicalSeason[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AstronomicalSeason valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • of

      public static AstronomicalSeason of(Moment moment)

      Determines the astronomical season related to given moment.

      The result will be valid for the northern hemisphere. For the southern equivalent, please call the method onSouthernHemisphere() on the result.

      Parameters:
      moment - the moment/instant for which the season is to be determined
      Returns:
      astronomical season (on the northern hemisphere)
      Throws:
      IllegalArgumentException - if the year is out of range -2000 <= year <= +3000
      Since:
      5.2
    • inYear

      public Moment inYear(int year)

      Determines the moment of this astronomical event in given year.

      The precision is for modern times (around 2000) better than a minute. The underlying astronomical calculations are based on formula given by Jean Meeus in his book "Astronomical algorithms".

      Parameters:
      year - gregorian/julian year
      Returns:
      time of this astronomical event (equinox or solstice) in given year
      Throws:
      IllegalArgumentException - if the year is out of range -2000 <= year <= +3000
    • julianDay

      public JulianDay julianDay(int year)

      Determines the Julian day of this astronomical event in given year.

      The precision is for modern times (around 2000) better than a minute. The underlying astronomical calculations are based on formula given by Jean Meeus in his book "Astronomical algorithms".

      Parameters:
      year - gregorian/julian year
      Returns:
      JD(TT) of this astronomical event (equinox or solstice) in given year
      Throws:
      IllegalArgumentException - if the year is out of range -2000 <= year <= +3000
      See Also:
      JulianDay.ofEphemerisTime(double)
    • onNorthernHemisphere

      public AstronomicalSeason onNorthernHemisphere()

      Interpretes this season as related to the northern hemisphere and returns this instance unchanged.

      This method does not change anything but serves for better documentation and more clarity about the meaning of this season.

      Returns:
      this instance (identity operation)
      Since:
      3.35/4.30
      See Also:
      onSouthernHemisphere()
    • onSouthernHemisphere

      public AstronomicalSeason onSouthernHemisphere()

      Interpretes this season as related to the southern hemisphere and returns the corresponding northern equivalent.

      Returns:
      northern equivalent of this season
      Since:
      3.35/4.30
      See Also:
      onNorthernHemisphere()