Enum Class ChineseEra
- All Implemented Interfaces:
Serializable
,Comparable<ChineseEra>
,java.lang.constant.Constable
,CalendarEra
The Chinese calendar does not have a universally accepted way of continuously counting years and prefers the sexagesimal cyclic years so this enum is mainly useful for either historic or half-academic debates.
The first year of an era is always counted as year 1. The historic Qing-eras started on Chinese New Year after the previous emperor had died or resigned.
- Since:
- 3.40/4.35
- 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 ConstantDescriptionCounts years since the reign of emperor Daoguang of Qing dynasty (from 1821 to 1851).Counts years since the reign of emperor Guangxu of Qing dynasty (from 1875 to 1909).Counts years since the reign of emperor Jiaqing of Qing dynasty (from 1796 to 1821).Counts years since the reign of emperor Kangxi of Qing dynasty (from 1662 to 1723).Counts years since the reign of emperor Qianlong of Qing dynasty (from 1736 to 1796).Counts years since the reign of emperor Shunzhi of Qing dynasty (from 1644 to 1662).Counts years since the reign of emperor Tongzhi of Qing dynasty (from 1862 to 1875).Counts years since the reign of emperor Xianfeng of Qing dynasty (from 1851 to 1862).Counts years since the reign of emperor Xuantong of Qing dynasty (from 1909 to 1912).Counts years since the reign of emperor Yongzheng of Qing dynasty (from 1723 to 1736).Marks the begin of the reign of legendary yellow emperor Huang-di which was assumed by Sun-yat-sen in year 2698 BCE. -
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.boolean
Does this era belongs to the Qing dynasty?static ChineseEra
Returns the enum constant of this class with the specified name.static ChineseEra[]
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
Methods inherited from interface net.time4j.engine.CalendarEra
name
-
Enum Constant Details
-
QING_SHUNZHI_1644_1662
Counts years since the reign of emperor Shunzhi of Qing dynasty (from 1644 to 1662).
-
QING_KANGXI_1662_1723
Counts years since the reign of emperor Kangxi of Qing dynasty (from 1662 to 1723).
-
QING_YONGZHENG_1723_1736
Counts years since the reign of emperor Yongzheng of Qing dynasty (from 1723 to 1736).
-
QING_QIANLONG_1736_1796
Counts years since the reign of emperor Qianlong of Qing dynasty (from 1736 to 1796).
-
QING_JIAQING_1796_1821
Counts years since the reign of emperor Jiaqing of Qing dynasty (from 1796 to 1821).
-
QING_DAOGUANG_1821_1851
Counts years since the reign of emperor Daoguang of Qing dynasty (from 1821 to 1851).
-
QING_XIANFENG_1851_1862
Counts years since the reign of emperor Xianfeng of Qing dynasty (from 1851 to 1862).
-
QING_TONGZHI_1862_1875
Counts years since the reign of emperor Tongzhi of Qing dynasty (from 1862 to 1875).
-
QING_GUANGXU_1875_1909
Counts years since the reign of emperor Guangxu of Qing dynasty (from 1875 to 1909).
-
QING_XUANTONG_1909_1912
Counts years since the reign of emperor Xuantong of Qing dynasty (from 1909 to 1912).
This was the era of the last (child-)emperor in Chinese history whose name was Pu-yi. He was forced to abdicate on February the 12th of 1912.
-
YELLOW_EMPEROR
Marks the begin of the reign of legendary yellow emperor Huang-di which was assumed by Sun-yat-sen in year 2698 BCE.
This way of continuous counting of years was also used by the Chinese community of San Francisco. However, other sources report as begin of the reign rather the year 2697 BCE (probably Sun-yat-sen has miscalculated his era proposal by one year or maybe mistreated the year zero).
-
-
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
)
-
isQingDynasty
public boolean isQingDynasty()Does this era belongs to the Qing dynasty?
- Returns:
true
if this era is associated with the Qing dynasty elsefalse
-