Enum Class Zodiac
- All Implemented Interfaces:
Serializable
,Comparable<Zodiac>
,java.lang.constant.Constable
Enumeration of the thirteen astronomical zodiac definitions.
See also Wikipedia. The boundaries of the associated constellations have been defined by IAU (International Astronomical Union).
Attention: Users are required to make a strict difference between constellations and the twelve astrological (horoscopic) zodiacs. Latter type is also supported by specialized methods.
- Since:
- 4.37
- Author:
- Meno Hochschild
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the event when the sun or moon enters or exits a zodiac.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Zodiac
constellationPassedByMoon(Moment moment)
Determines the zodiac constellation passed by the moon at given moment.static Zodiac
constellationPassedBySun(Moment moment)
Determines the zodiac constellation passed by the sun at given moment.getDisplayName(Locale locale)
Obtains a localized name.char
Obtains the associated symbol character.next()
Obtains the zodiac which happens next after this zodiac.previous()
Obtains the zodiac which happens previous before this zodiac.static Zodiac
signPassedByMoon(Moment moment)
Determines the zodiac sign passed by the moon at given moment.static Zodiac
signPassedBySun(Moment moment)
Determines the zodiac sign passed by the sun at given moment.static Zodiac
Returns the enum constant of this class with the specified name.static Zodiac[]
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
-
ARIES
-
TAURUS
-
GEMINI
-
CANCER
-
LEO
-
VIRGO
-
LIBRA
-
SCORPIUS
-
OPHIUCHUS
-
SAGITTARIUS
-
CAPRICORNUS
-
AQUARIUS
-
PISCES
-
-
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
-
constellationPassedBySun
Determines the zodiac constellation passed by the sun at given moment.
- Parameters:
moment
- the moment when any zodiac is passed- Returns:
- Zodiac constellation
-
constellationPassedByMoon
Determines the zodiac constellation passed by the moon at given moment.
- Parameters:
moment
- the moment when any zodiac is passed- Returns:
- Zodiac constellation
-
signPassedBySun
Determines the zodiac sign passed by the sun at given moment.
- Parameters:
moment
- the moment when any zodiac is passed- Returns:
- Zodiac sign
-
signPassedByMoon
Determines the zodiac sign passed by the moon at given moment.
- Parameters:
moment
- the moment when any zodiac is passed- Returns:
- Zodiac sign
-
getSymbol
public char getSymbol()Obtains the associated symbol character.
- Returns:
- char
-
getDisplayName
Obtains a localized name.
- Parameters:
locale
- language- Returns:
- localized name or the Latin name if given language is not supported
-
previous
Obtains the zodiac which happens previous before this zodiac.
- Returns:
- previous zodiac
-
next
Obtains the zodiac which happens next after this zodiac.
- Returns:
- next zodiac
-