public static enum EthiopianTime.Unit extends java.lang.Enum<EthiopianTime.Unit> implements ChronoUnit
Defines the time units for the Ethiopian clock time.
| Modifier and Type | Method and Description |
|---|---|
int |
between(EthiopianTime start,
EthiopianTime end)
Calculates the difference between given Ethiopian times in this unit.
|
double |
getLength()
Defines the typical length of this time unit in seconds without
taking into account anomalies like timezone effects or leap seconds.
|
boolean |
isCalendrical()
Queries if this time unit is calendrical respective is at least
as long as a calendar day.
|
static EthiopianTime.Unit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static EthiopianTime.Unit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EthiopianTime.Unit HOURS
public static final EthiopianTime.Unit MINUTES
public static final EthiopianTime.Unit SECONDS
public static EthiopianTime.Unit[] values()
for (EthiopianTime.Unit c : EthiopianTime.Unit.values()) System.out.println(c);
public static EthiopianTime.Unit 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 double getLength()
ChronoUnitDefines the typical length of this time unit in seconds without taking into account anomalies like timezone effects or leap seconds.
Important note: This method can only yield an estimated value and is not intended to assist in calculations of durations, but only in sorting of units.
getLength in interface ChronoUnitpublic boolean isCalendrical()
ChronoUnitQueries if this time unit is calendrical respective is at least as long as a calendar day.
Implementation note: The method must be consistent with the typical
length of the unit. The expression
Double.compare(unit.getLength(), 86400.0) >= 0 is
equivalent to unit.isCalendrical().
isCalendrical in interface ChronoUnittrue if at least as long as a day else falsepublic int between(EthiopianTime start, EthiopianTime end)
Calculates the difference between given Ethiopian times in this unit.
start - start time (inclusive)end - end time (exclusive)