- All Implemented Interfaces:
An era in the Julian calendar system.
The Julian calendar system has two eras. The current era, for years from 1 onwards, is known as 'Anno Domini'. 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 Christ' era.
The start of the Julian epoch
Do not use
ordinal()to obtain the numeric representation of
Implementation Requirements:This is an immutable and thread-safe enum.
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description
getValue()Gets the numeric era
of(int era)Obtains an instance of
valueOf(String name)Returns the enum constant of this type with the specified name.
values()Returns an array containing the constants of this enum type, in the order they are declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static JulianEra values()Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (JulianEra c : JulianEra.values()) System.out.println(c);
- an array containing the constants of this enum type, in the order they are declared
valueOfReturns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
public static JulianEra of(int era)Obtains an instance of
JulianErais an enum representing the Julian eras of BC/AD. This factory allows the enum to be obtained from the
era- the BC/AD value to represent, from 0 (BC) to 1 (AD)
- the era singleton, not null
DateTimeException- if the value is invalid