public enum SolarTerm extends Enum<SolarTerm>
See also Wikipedia.
| Enum Constant and Description |
|---|
MAJOR_01_YUSHUI_330
Solar longitude 330.
|
MAJOR_02_CHUNFEN_000
Solar longitude 0.
|
MAJOR_03_GUYU_030
Solar longitude 30.
|
MAJOR_04_XIAOMAN_060
Solar longitude 60.
|
MAJOR_05_XIAZHI_090
Solar longitude 90.
|
MAJOR_06_DASHU_120
Solar longitude 120.
|
MAJOR_07_CHUSHU_150
Solar longitude 150.
|
MAJOR_08_QIUFEN_180
Solar longitude 180.
|
MAJOR_09_SHUANGJIANG_210
Solar longitude 210.
|
MAJOR_10_XIAOXUE_240
Solar longitude 240.
|
MAJOR_11_DONGZHI_270
Solar longitude 270.
|
MAJOR_12_DAHAN_300
Solar longitude 300.
|
MINOR_01_LICHUN_315
Solar longitude 315.
|
MINOR_02_JINGZHE_345
Solar longitude 345.
|
MINOR_03_QINGMING_015
Solar longitude 15.
|
MINOR_04_LIXIA_045
Solar longitude 45.
|
MINOR_05_MANGZHONG_075
Solar longitude 75.
|
MINOR_06_XIAOSHU_105
Solar longitude 105.
|
MINOR_07_LIQIU_135
Solar longitude 135.
|
MINOR_08_BAILU_165
Solar longitude 165.
|
MINOR_09_HANLU_195
Solar longitude 195.
|
MINOR_10_LIDONG_225
Solar longitude 225.
|
MINOR_11_DAXUE_255
Solar longitude 255.
|
MINOR_12_XIAOHAN_285
Solar longitude 285.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDisplayName(Locale locale)
Gets the description text dependent on the locale.
|
int |
getIndex()
Obtains the associated index according to the traditional order in the Chinese calendar.
|
int |
getSolarLongitude()
Obtains the associated solar longitude in degrees.
|
boolean |
isMajor()
Does this instance represent a principal (major) solar term in multiples of 30 degrees?
|
boolean |
isMinor()
Does this instance represent a minor solar term?
|
static <D extends EastAsianCalendar<?,D>> |
list(int gregorianYear,
Chronology<D> chronology)
Obtains a list of dates of all solar terms beginning with Lichun in spring of given gregorian year.
|
static SolarTerm |
of(Moment moment)
Obtains an instance of
SolarTerm at given moment. |
static SolarTerm |
ofMajor(int index)
Obtains a major
SolarTerm by given index
according to the traditional order in the Chinese calendar. |
static SolarTerm |
ofMinor(int index)
Obtains a minor
SolarTerm by given index
according to the traditional order in the Chinese calendar. |
<D extends EastAsianCalendar<?,D>> |
onOrAfter(D date)
Determines the date when this solar term will happen on or after given date.
|
static SolarTerm |
parse(CharSequence text,
Locale locale)
Tries to interprete given text as solar term.
|
SolarTerm |
roll(int amount)
Rolls this instance by given amount of solar terms.
|
<D extends EastAsianCalendar<?,D>> |
sinceLichun()
Obtains an operator which searches for this solar term on or after Lichun event in the gregorian year
corresponding to the East Asian calendar date in question.
|
<D extends EastAsianCalendar<?,D>> |
sinceNewYear()
Obtains an operator which searches for this solar term on or after New Year
of the East Asian calendar date in question.
|
static SolarTerm |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SolarTerm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SolarTerm MINOR_01_LICHUN_315
public static final SolarTerm MAJOR_01_YUSHUI_330
public static final SolarTerm MINOR_02_JINGZHE_345
public static final SolarTerm MAJOR_02_CHUNFEN_000
public static final SolarTerm MINOR_03_QINGMING_015
public static final SolarTerm MAJOR_03_GUYU_030
public static final SolarTerm MINOR_04_LIXIA_045
public static final SolarTerm MAJOR_04_XIAOMAN_060
public static final SolarTerm MINOR_05_MANGZHONG_075
public static final SolarTerm MAJOR_05_XIAZHI_090
public static final SolarTerm MINOR_06_XIAOSHU_105
public static final SolarTerm MAJOR_06_DASHU_120
public static final SolarTerm MINOR_07_LIQIU_135
public static final SolarTerm MAJOR_07_CHUSHU_150
public static final SolarTerm MINOR_08_BAILU_165
public static final SolarTerm MAJOR_08_QIUFEN_180
public static final SolarTerm MINOR_09_HANLU_195
public static final SolarTerm MAJOR_09_SHUANGJIANG_210
public static final SolarTerm MINOR_10_LIDONG_225
public static final SolarTerm MAJOR_10_XIAOXUE_240
public static final SolarTerm MINOR_11_DAXUE_255
public static final SolarTerm MAJOR_11_DONGZHI_270
public static final SolarTerm MINOR_12_XIAOHAN_285
public static final SolarTerm MAJOR_12_DAHAN_300
public static SolarTerm[] values()
for (SolarTerm c : SolarTerm.values()) System.out.println(c);
public static SolarTerm valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static SolarTerm ofMajor(int index)
Obtains a major SolarTerm by given index
according to the traditional order in the Chinese calendar.
index - an integer in range 1-12IllegalArgumentException - if the index is out of rangepublic static SolarTerm ofMinor(int index)
Obtains a minor SolarTerm by given index
according to the traditional order in the Chinese calendar.
index - an integer in range 1-12IllegalArgumentException - if the index is out of rangepublic static SolarTerm of(Moment moment)
Obtains an instance of SolarTerm at given moment.
moment - the moment for which the solar term needs to be searchedIllegalArgumentException - if the Julian day of moment is not in supported rangeJulianDay.MIN,
JulianDay.MAXpublic int getIndex()
Obtains the associated index according to the traditional order in the Chinese calendar.
The index itself is not unique because a solar term must be qualified by the major/minor-property, too.
public boolean isMajor()
Does this instance represent a principal (major) solar term in multiples of 30 degrees?
isMinor()public boolean isMinor()
Does this instance represent a minor solar term?
isMajor()public int getSolarLongitude()
Obtains the associated solar longitude in degrees.
0 <= angle < 360)public SolarTerm roll(int amount)
Rolls this instance by given amount of solar terms.
amount - count of solar terms (maybe negative)public <D extends EastAsianCalendar<?,D>> D onOrAfter(D date)
Determines the date when this solar term will happen on or after given date.
D - type of the East Asian chronology to be applieddate - the starting date of the search for this solar termpublic static <D extends EastAsianCalendar<?,D>> List<D> list(int gregorianYear, Chronology<D> chronology)
Obtains a list of dates of all solar terms beginning with Lichun in spring of given gregorian year.
Note: The returned list of solar terms might cover different calendar years because the solar cycle is generally different from the lunar calendar cycle.
D - type of the East Asian chronology to be appliedgregorianYear - the gregorian year in which the first solar term Lichun occurschronology - chronology for generating the calendar dates of the listMINOR_01_LICHUN_315,
onOrAfter(D)public <D extends EastAsianCalendar<?,D>> ChronoOperator<D> sinceLichun()
Obtains an operator which searches for this solar term on or after Lichun event in the gregorian year corresponding to the East Asian calendar date in question.
Example:
ChineseCalendar chineseNewYear = ChineseCalendar.ofNewYear(2021); // 2021-02-12
assertThat(
chineseNewYear.with(SolarTerm.MINOR_01_LICHUN_315.sinceLichun()).transform(PlainDate.class),
is(PlainDate.of(2021, 2, 3)));
D - type of the East Asian chronology to be appliedsinceNewYear()public <D extends EastAsianCalendar<?,D>> ChronoOperator<D> sinceNewYear()
Obtains an operator which searches for this solar term on or after New Year of the East Asian calendar date in question.
Example:
ChineseCalendar chineseNewYear = ChineseCalendar.ofNewYear(2021); // 2021-02-12
assertThat(
chineseNewYear.with(SolarTerm.MINOR_01_LICHUN_315.sinceNewYear()).transform(PlainDate.class),
is(PlainDate.of(2022, 2, 4)));
This operator is related to East Asian calendar years and not to the usually different solar term cycles starting at Lichun. Some East Asian calendar years might contain the given solar term even twice or not at all. In first case (if the given solar term occurs twice in corresponding East Asian calendar year), the operator will determine the first and not the second occurence of solar term. If the East Asian calendar year does not contain given solar term then the operator will yield the solar term of next calendar year (see code example above).
D - type of the East Asian chronology to be appliedsinceLichun()public String getDisplayName(Locale locale)
Gets the description text dependent on the locale.
locale - language settingnull)public static SolarTerm parse(CharSequence text, Locale locale) throws ParseException
Tries to interprete given text as solar term.
text - the text to be parsedlocale - language settingParseException - if parsing failsCopyright © 2014–2021. All rights reserved.