public enum HistoricEra extends java.lang.Enum<HistoricEra> implements CalendarEra
Represents a historic era dividing the local timeline at roughly the point of Jesu birth in the context of the julian/gregorian calendar.
| Enum Constant and Description |
|---|
AD
AD = Anno Domini
|
BC
BC = Before Christian
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAlternativeName(java.util.Locale locale,
TextWidth width)
Gets an alternative description text dependent on the locale and text width.
|
java.lang.String |
getDisplayName(java.util.Locale locale,
TextWidth width)
Gets the description text dependent on the locale and text width.
|
int |
getValue()
Yields an ordinal number which is scaled such that every era
which contains the ISO-date of UTC-epoch [1972-01-01] will have
the associated value
1. |
static HistoricEra |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static HistoricEra[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOfnamepublic static final HistoricEra BC
BC = Before Christian
public static final HistoricEra AD
AD = Anno Domini
public static HistoricEra[] values()
for (HistoricEra c : HistoricEra.values()) System.out.println(c);
public static HistoricEra valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic int getValue()
CalendarEraYields an ordinal number which is scaled such that every era
which contains the ISO-date of UTC-epoch [1972-01-01] will have
the associated value 1.
getValue in interface CalendarErapublic java.lang.String getDisplayName(java.util.Locale locale,
TextWidth width)
Gets the description text dependent on the locale and text width.
locale - language settingwidth - text widthnull)public java.lang.String getAlternativeName(java.util.Locale locale,
TextWidth width)
Gets an alternative description text dependent on the locale and text width.
Actually this method only yields the English notations of "(Before) Common Era" (BCE/CE).
locale - language settingwidth - text widthnull)