Package net.time4j.calendar
Enum Class EthiopianTime.Unit
- All Implemented Interfaces:
Serializable
,Comparable<EthiopianTime.Unit>
,java.lang.constant.Constable
,ChronoUnit
- Enclosing class:
- EthiopianTime
Defines the time units for the Ethiopian clock time.
- Since:
- 3.11/4.8
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
between(EthiopianTime start, EthiopianTime end)
Calculates the difference between given Ethiopian times in this unit.double
Defines the typical length of this time unit in seconds without taking into account anomalies like timezone effects or leap seconds.static EthiopianTime.Unit
Returns the enum constant of this class with the specified name.static EthiopianTime.Unit[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface net.time4j.engine.ChronoUnit
isCalendrical
-
Enum Constant Details
-
HOURS
-
MINUTES
-
SECONDS
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getLength
public double getLength()Description copied from interface:ChronoUnit
Defines 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.
- Specified by:
getLength
in interfaceChronoUnit
- Returns:
- estimated decimal value in seconds
-
between
Calculates the difference between given Ethiopian times in this unit.
- Parameters:
start
- start time (inclusive)end
- end time (exclusive)- Returns:
- difference counted in this unit
- Since:
- 3.11/4.8
-