public enum HijriMonth extends Enum<HijriMonth> implements ChronoCondition<HijriCalendar>
The Hijri calendar defines 12 islamic months.
| Enum Constant and Description |
|---|
DHU_AL_HIJJAH
The twelfth and last month of Hijri year.
|
DHU_AL_QIDAH
The eleventh month of Hijri year.
|
JUMADA_I
The fifth month of Hijri year.
|
JUMADA_II
The sixth month of Hijri year.
|
MUHARRAM
The first month of Hijri year.
|
RABI_I
The third month of Hijri year.
|
RABI_II
The fourth month of Hijri year.
|
RAJAB
The seventh month of Hijri year.
|
RAMADAN
The nineth month of Hijri year.
|
SAFAR
The second month of Hijri year.
|
SHABAN
The eigth month of Hijri year.
|
SHAWWAL
The tenth month of Hijri year.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDisplayName(Locale locale)
Equivalent to the expression
getDisplayName(locale, TextWidth.WIDE, OutputContext.FORMAT). |
String |
getDisplayName(Locale locale,
TextWidth width,
OutputContext context)
Gets the description text dependent on the locale and style
parameters.
|
int |
getValue()
Gets the corresponding numerical value.
|
boolean |
test(HijriCalendar context)
Decides if given context matches this condition.
|
static HijriMonth |
valueOf(int month)
Gets the enum-constant which corresponds to the given numerical
value.
|
static HijriMonth |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HijriMonth[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HijriMonth MUHARRAM
public static final HijriMonth SAFAR
public static final HijriMonth RABI_I
public static final HijriMonth RABI_II
public static final HijriMonth JUMADA_I
public static final HijriMonth JUMADA_II
public static final HijriMonth RAJAB
public static final HijriMonth SHABAN
public static final HijriMonth RAMADAN
public static final HijriMonth SHAWWAL
public static final HijriMonth DHU_AL_QIDAH
public static final HijriMonth DHU_AL_HIJJAH
public static HijriMonth[] values()
for (HijriMonth c : HijriMonth.values()) System.out.println(c);
public static HijriMonth 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 HijriMonth valueOf(int month)
Gets the enum-constant which corresponds to the given numerical value.
month - islamic month in the range [1-12]IllegalArgumentException - if given argument is out of rangepublic int getValue()
Gets the corresponding numerical value.
public String getDisplayName(Locale locale)
Equivalent to the expression
getDisplayName(locale, TextWidth.WIDE, OutputContext.FORMAT).
locale - language settingnull)getDisplayName(Locale, TextWidth, OutputContext)public String getDisplayName(Locale locale, TextWidth width, OutputContext context)
Gets the description text dependent on the locale and style parameters.
The second argument controls the width of description while the third argument is only relevant for languages which make a difference between stand-alone forms and embedded text forms (does not matter in English).
locale - language settingwidth - text widthcontext - output contextnull)public boolean test(HijriCalendar context)
ChronoConditionDecides if given context matches this condition.
Due to better readability it is recommended to use following equivalent approach instead of this method::
import static net.time4j.Weekday.SATURDAY; import static net.time4j.Month.JANUARY; PlainDate date = PlainDate.of(2014, JANUARY, 25); System.out.println(SATURDAY.test(date)); // direct use System.out.println(date.matches(SATURDAY)); // recommended callback
test in interface Predicate<HijriCalendar>test in interface ChronoCondition<HijriCalendar>context - context as base of testing this conditiontrue if given time context matches this condition
else falseCopyright © 2014–2021. All rights reserved.