java.time.chrono.Era, java.time.temporal.TemporalAccessor, java.time.temporal.TemporalAdjusterpublic enum CopticEra extends java.lang.Enum<CopticEra> implements java.time.chrono.Era
The Coptic calendar system has two eras. The current era, for years from 1 onwards, is known as the 'Era of the Martyrs'. All previous years, zero or earlier in the proleptic count or one and greater in the year-of-era count, are part of the 'Before Era of the Martyrs' era.
The start of the Coptic epoch 0001-01-01 (Coptic) is 0284-08-29 (ISO).
Do not use ordinal() to obtain the numeric representation of CopticEra.
Use getValue() instead.
| Enum Constant | Description |
|---|---|
AM |
The singleton instance for the current era, 'Era of the Martyrs',
which has the numeric value 1.
|
BEFORE_AM |
The singleton instance for the era before the current one, 'Before Era of the Martyrs',
which has the numeric value 0.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getValue() |
Gets the numeric era
int value. |
static CopticEra |
of(int era) |
Obtains an instance of
CopticEra from an int value. |
static CopticEra |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static CopticEra[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfpublic static final CopticEra BEFORE_AM
public static final CopticEra AM
public static CopticEra[] values()
for (CopticEra c : CopticEra.values()) System.out.println(c);
public static CopticEra valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static CopticEra of(int era)
CopticEra from an int value.
CopticEra is an enum representing the Coptic eras of BEFORE_AM/AM.
This factory allows the enum to be obtained from the int value.
era - the BEFORE_AM/AM value to represent, from 0 (BEFORE_AM) to 1 (AM)java.time.DateTimeException - if the value is invalidpublic int getValue()
int value.
The era BEFORE_AM has the value 0, while the era AM has the value 1.
getValue in interface java.time.chrono.EraCopyright © 2010–2018 ThreeTen.org. All rights reserved.