public enum DiscordianEra extends Enum<DiscordianEra> implements java.time.chrono.Era
The Discordian calendar system has one era. The current era, for years from 1 onwards, is known as the 'Year of Our Lady of Discord'. No other eras are supported.
The start of the Discordian epoch 0001-01-01 (Discordian)
is -1165-01-01 (ISO)
.
Do not use ordinal()
to obtain the numeric representation of DiscordianEra
.
Use getValue()
instead.
Enum Constant and Description |
---|
YOLD
The singleton instance for the current era, 'Year of Our Lady of Discord',
which has the numeric value 1.
|
Modifier and Type | Method and Description |
---|---|
int |
getValue()
Gets the numeric era
int value. |
static DiscordianEra |
of(int era)
Obtains an instance of
DiscordianEra from an int value. |
static DiscordianEra |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DiscordianEra[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DiscordianEra YOLD
public static DiscordianEra[] values()
for (DiscordianEra c : DiscordianEra.values()) System.out.println(c);
public static DiscordianEra valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static DiscordianEra of(int era)
DiscordianEra
from an int
value.
DiscordianEra
is an enum representing the Discordian era of YOLD.
This factory allows the enum to be obtained from the int
value.
Only the value 1 is ever accepted.
era
- the YOLD value to represent, which must be 1 (YOLD)java.time.DateTimeException
- if the value is invalidpublic int getValue()
int
value.
The era YOLD has the value 1.
getValue
in interface java.time.chrono.Era
Copyright © 2010–2014 ThreeTen.org. All rights reserved.