Enum Class EthiopianTime.Unit

java.lang.Object
java.lang.Enum<EthiopianTime.Unit>
net.time4j.calendar.EthiopianTime.Unit
All Implemented Interfaces:
Serializable, Comparable<EthiopianTime.Unit>, java.lang.constant.Constable, ChronoUnit
Enclosing class:
EthiopianTime

public static enum EthiopianTime.Unit extends Enum<EthiopianTime.Unit> implements ChronoUnit

Defines the time units for the Ethiopian clock time.

Since:
3.11/4.8
  • Enum Constant Details

  • Method Details

    • values

      public static EthiopianTime.Unit[] 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

      public static EthiopianTime.Unit valueOf(String name)
      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 name
      NullPointerException - 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 interface ChronoUnit
      Returns:
      estimated decimal value in seconds
    • between

      public int between(EthiopianTime start, EthiopianTime end)

      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