Enum Class HebrewTime.Unit

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

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

Defines the time units for the Hebrew time.

Since:
3.37/4.32
  • Enum Constant Details

  • Method Details

    • values

      public static HebrewTime.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 HebrewTime.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(HebrewTime start, HebrewTime end)

      Calculates the difference between given Hebrew times in this unit.

      Parameters:
      start - start time (inclusive)
      end - end time (exclusive)
      Returns:
      difference counted in this unit