Package net.time4j.calendar
Enum Class CopticMonth
- All Implemented Interfaces:
Serializable
,Comparable<CopticMonth>
,java.lang.constant.Constable
,Predicate<CopticCalendar>
,ChronoCondition<CopticCalendar>
The Coptic calendar defines 13 Coptic months.
- Since:
- 3.11/4.8
- 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 6th month of Coptic calendar with 30 days.The 2nd month of Coptic calendar with 30 days.The 7th month of Coptic calendar with 30 days.The 8th month of Coptic calendar with 30 days.The 9th month of Coptic calendar with 30 days.The 11th month of Coptic calendar with 30 days.The 3rd month of Coptic calendar with 30 days.The 4th month of Coptic calendar with 30 days.The 12th month of Coptic calendar with 30 days.The 13th month of Coptic calendar with 5 or 6 days (if in leap year).The 10th month of Coptic calendar with 30 days.The 5th month of Coptic calendar with 30 days.The 1st month of Coptic calendar with 30 days. -
Method Summary
Modifier and TypeMethodDescriptiongetDisplayName(Locale locale)
Equivalent to the expressiongetDisplayName(locale, TextWidth.WIDE, OutputContext.FORMAT)
.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(CopticCalendar context)
Decides if given context matches this condition.static CopticMonth
valueOf(int month)
Gets the enum-constant which corresponds to the given numerical value.static CopticMonth
Returns the enum constant of this class with the specified name.static CopticMonth[]
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
-
TOUT
The 1st month of Coptic calendar with 30 days. -
BABA
The 2nd month of Coptic calendar with 30 days. -
HATOR
The 3rd month of Coptic calendar with 30 days. -
KIAHK
The 4th month of Coptic calendar with 30 days. -
TOBA
The 5th month of Coptic calendar with 30 days. -
AMSHIR
The 6th month of Coptic calendar with 30 days. -
BARAMHAT
The 7th month of Coptic calendar with 30 days. -
BARAMOUDA
The 8th month of Coptic calendar with 30 days. -
BASHANS
The 9th month of Coptic calendar with 30 days. -
PAONA
The 10th month of Coptic calendar with 30 days. -
EPEP
The 11th month of Coptic calendar with 30 days. -
MESRA
The 12th month of Coptic calendar with 30 days. -
NASIE
The 13th month of Coptic calendar with 5 or 6 days (if in leap year).
-
-
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
-
valueOf
Gets the enum-constant which corresponds to the given numerical value.
- Parameters:
month
- coptic month in the range [1-13]- Returns:
- coptic month of year as enum
- Throws:
IllegalArgumentException
- if given argument is out of range- Since:
- 3.11/4.8
-
getValue
public int getValue()Gets the corresponding numerical value.
- Returns:
- number of month in the range [1-13]
- Since:
- 3.11/4.8
-
getDisplayName
Equivalent to the expression
getDisplayName(locale, TextWidth.WIDE, OutputContext.FORMAT)
.- Parameters:
locale
- language setting- Returns:
- descriptive text (long form, never
null
) - Since:
- 3.11/4.8
- See Also:
getDisplayName(Locale, TextWidth, OutputContext)
-
getDisplayName
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).
- Parameters:
locale
- language settingwidth
- text widthcontext
- output context- Returns:
- descriptive text for given locale and style (never
null
) - Since:
- 3.11/4.8
-
test
Description copied from interface:ChronoCondition
Decides 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
- Specified by:
test
in interfaceChronoCondition<CopticCalendar>
- Specified by:
test
in interfacePredicate<CopticCalendar>
- Parameters:
context
- context as base of testing this condition- Returns:
true
if given time context matches this condition elsefalse
-