Enum InternationalFixedEra

java.lang.Object
java.lang.Enum<InternationalFixedEra>
org.threeten.extra.chrono.InternationalFixedEra
All Implemented Interfaces:
Serializable, Comparable<InternationalFixedEra>, Era, TemporalAccessor, TemporalAdjuster

public enum InternationalFixedEra extends Enum<InternationalFixedEra> implements Era
An era in the International Fixed calendar system.

The International Fixed calendar system officially only has one era. The current era, for years from 1 onwards, is known as 'Current Era'. All previous years are invalid.

The start of the International Fixed epoch 0001/01/01 (IFC) is 0001-01-01 (ISO).

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

Implementation Requirements:

This is an immutable and thread-safe enum.
  • Enum Constant Details

    • CE

      public static final InternationalFixedEra CE
      The singleton instance for the current era, 'Current Era', which has the numeric value 1.
  • Method Details

    • values

      public static InternationalFixedEra[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static InternationalFixedEra valueOf(String name)
      Returns 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.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • of

      public static InternationalFixedEra of(int era)
      Obtains an instance of InternationalFixedEra from an int value.

      InternationalFixedEra is an enum representing the International Fixed era of CE. This factory allows the enum to be obtained from the int value.

      Parameters:
      era - the CE value to represent, only 1 (CE)
      Returns:
      the era singleton, not null
      Throws:
      DateTimeException - if the value is invalid
    • getValue

      public int getValue()
      Gets the numeric era int value.

      The era CE has the value 1.

      Specified by:
      getValue in interface Era
      Returns:
      the era value, only 1 (CE)