Top Description Fields Constructors Methods
org.threeten.extra.chrono

public final Enum CopticEra

extends Enum<CopticEra>
implements Era
Class Inheritance
All Implemented Interfaces
java.time.chrono.Era, java.time.temporal.TemporalAdjuster, java.time.temporal.TemporalAccessor
Imports
java.time.DateTimeException, java.time.chrono.Era

An era in the Coptic calendar system.

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.

Implementation Requirements:

This is an immutable and thread-safe enum.

Field Summary

Modifier and TypeField and Description
public static final CopticEra
AM

The singleton instance for the current era, 'Era of the Martyrs', which has the numeric value 1.

public static final CopticEra
BEFORE_AM

The singleton instance for the era before the current one, 'Before Era of the Martyrs', which has the numeric value 0.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the era value, from 0 (BEFORE_AM) to 1 (AM)
getValue
()

Implements java.time.chrono.Era.getValue.

Gets the numeric era int value.

public static CopticEra

Returns:

the era singleton, not null
of
(int
the BEFORE_AM/AM value to represent, from 0 (BEFORE_AM) to 1 (AM)
era
)

Obtains an instance of CopticEra from an int value.

public static CopticEra
public static CopticEra[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AMback to summary
public static final CopticEra AM

The singleton instance for the current era, 'Era of the Martyrs', which has the numeric value 1.

BEFORE_AMback to summary
public static final CopticEra BEFORE_AM

The singleton instance for the era before the current one, 'Before Era of the Martyrs', which has the numeric value 0.

Constructor Detail

CopticEraback to summary
private CopticEra()

Method Detail

getValueback to summary
public int getValue()

Implements java.time.chrono.Era.getValue.

Gets the numeric era int value.

The era BEFORE_AM has the value 0, while the era AM has the value 1.

Returns:int

the era value, from 0 (BEFORE_AM) to 1 (AM)

Annotations
@Override
ofback to summary
public static CopticEra of(int era)

Obtains an instance of 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.

Parameters
era:int

the BEFORE_AM/AM value to represent, from 0 (BEFORE_AM) to 1 (AM)

Returns:CopticEra

the era singleton, not null

Exceptions
DateTimeException:
if the value is invalid
valueOfback to summary
public static CopticEra valueOf(String name)
valuesback to summary
public static CopticEra[] values()