Package net.time4j.calendar.hindu
Enum Class HinduEra
- All Implemented Interfaces:
Serializable
,Comparable<HinduEra>
,java.lang.constant.Constable
,CalendarEra
The Hindu calendar supports several eras in different regions of Indian subcontinent.
- Since:
- 5.6
- 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 ConstantDescriptionThe onset of this era mainly used in West Bengal is 515 years after Saka.The onset of this ancient era (iron age) is 3179 years before Saka.The onset of this era mainly used in Kerala (part of Malayalam calendar) is 900 years before Saka.The onset of this era mainly used in Nepal is 955 years before Saka.The onset of this era is in gregorian year +78.The onset of this era mainly used in Northern India is 135 years before Saka. -
Method Summary
Modifier and TypeMethodDescriptiongetDisplayName(Locale locale)
Equivalent to the expressiongetDisplayName(locale, TextWidth.WIDE)
.getDisplayName(Locale locale, TextWidth width)
Gets the description text dependent on the locale and style parameters.static HinduEra
Returns the enum constant of this class with the specified name.static HinduEra[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.int
Scales given year of era to another year related to this era.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface net.time4j.engine.CalendarEra
name
-
Enum Constant Details
-
KALI_YUGA
The onset of this ancient era (iron age) is 3179 years before Saka. -
NEPALESE
The onset of this era mainly used in Nepal is 955 years before Saka. -
KOLLAM
The onset of this era mainly used in Kerala (part of Malayalam calendar) is 900 years before Saka. -
VIKRAMA
The onset of this era mainly used in Northern India is 135 years before Saka. -
SAKA
The onset of this era is in gregorian year +78. -
BENGAL
The onset of this era mainly used in West Bengal is 515 years after Saka.
-
-
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
-
getDisplayName
Equivalent to the expression
getDisplayName(locale, TextWidth.WIDE)
.- Parameters:
locale
- language setting- Returns:
- descriptive text (long form, never
null
) - See Also:
getDisplayName(Locale, TextWidth)
-
getDisplayName
Gets the description text dependent on the locale and style parameters.
The second argument controls the width of description.
- Parameters:
locale
- language settingwidth
- text width- Returns:
- descriptive text for given locale and style (never
null
)
-
yearOfEra
Scales given year of era to another year related to this era.
- Parameters:
era
- era reference of given yearyearOfEra
- year reckoned in given era- Returns:
- year related to this era
- Throws:
IllegalArgumentException
- if numerical overflow occurs
-