Enum Class AstronomicalSeason
- All Implemented Interfaces:
Serializable
,Comparable<AstronomicalSeason>
,java.lang.constant.Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionBegin of Autumn on the northern hemisphere in September (or Spring on the southern hemisphere).Begin of Summer on the northern hemisphere in June (or Winter on the southern hemisphere).Begin of Spring on the northern hemisphere in March (or Autumn on the southern hemisphere).Begin of Winter on the northern hemisphere in December (or Summer on the southern hemisphere). -
Method Summary
Modifier and TypeMethodDescriptioninYear(int year)
Determines the moment of this astronomical event in given year.julianDay(int year)
Determines the Julian day of this astronomical event in given year.static AstronomicalSeason
Determines the astronomical season related to given moment.Interpretes this season as related to the northern hemisphere and returns this instance unchanged.Interpretes this season as related to the southern hemisphere and returns the corresponding northern equivalent.static AstronomicalSeason
Returns the enum constant of this class with the specified name.static AstronomicalSeason[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
VERNAL_EQUINOX
Begin of Spring on the northern hemisphere in March (or Autumn on the southern hemisphere).
-
SUMMER_SOLSTICE
Begin of Summer on the northern hemisphere in June (or Winter on the southern hemisphere).
-
AUTUMNAL_EQUINOX
Begin of Autumn on the northern hemisphere in September (or Spring on the southern hemisphere).
-
WINTER_SOLSTICE
Begin of Winter on the northern hemisphere in December (or Summer on the southern hemisphere).
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
of
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
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
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
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
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()
-