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

public final Enum EthiopicEra

extends Enum<EthiopicEra>
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 Ethiopic calendar system.

The Ethiopic calendar system has two eras. The current era, for years from 1 onwards, is known as the 'Incarnation Era'. 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 Incarnation Era' era.

The start of the Ethiopic epoch 0001-01-01 (Ethiopic) is 0284-08-29 (ISO).

Do not use ordinal() to obtain the numeric representation of EthiopicEra. Use getValue() instead.

Implementation Requirements:

This is an immutable and thread-safe enum.

Field Summary

Modifier and TypeField and Description
public static final EthiopicEra
BEFORE_INCARNATION

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

public static final EthiopicEra
INCARNATION

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

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the era value, from 0 (BEFORE_INCARNATION) to 1 (INCARNATION)
getValue
()

Implements java.time.chrono.Era.getValue.

Gets the numeric era int value.

public static EthiopicEra

Returns:

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

Obtains an instance of EthiopicEra from an int value.

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

Field Detail

BEFORE_INCARNATIONback to summary
public static final EthiopicEra BEFORE_INCARNATION

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

INCARNATIONback to summary
public static final EthiopicEra INCARNATION

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

Constructor Detail

EthiopicEraback to summary
private EthiopicEra()

Method Detail

getValueback to summary
public int getValue()

Implements java.time.chrono.Era.getValue.

Gets the numeric era int value.

The era BEFORE_INCARNATION has the value 0, while the era INCARNATION has the value 1.

Returns:int

the era value, from 0 (BEFORE_INCARNATION) to 1 (INCARNATION)

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

Obtains an instance of EthiopicEra from an int value.

EthiopicEra is an enum representing the Ethiopic eras of BEFORE_INCARNATION/INCARNATION. This factory allows the enum to be obtained from the int value.

Parameters
era:int

the BEFORE_INCARNATION/INCARNATION value to represent, from 0 (BEFORE_INCARNATION) to 1 (INCARNATION)

Returns:EthiopicEra

the era singleton, not null

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