Enum Class HijriCalendar.Unit
- All Implemented Interfaces:
- Serializable,- Comparable<HijriCalendar.Unit>,- java.lang.constant.Constable,- ChronoUnit
- Enclosing class:
- HijriCalendar
Defines some calendar units for the Hijri calendar.
- Since:
- 3.14/4.10
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum Constants
- 
Method SummaryModifier and TypeMethodDescriptionintbetween(HijriCalendar start, HijriCalendar end, String variant)Calculates the difference between given islamic dates in this unit.intbetween(HijriCalendar start, HijriCalendar end, VariantSource variantSource)Equivalent tobetween(start, end, variantSource.getVariant()).doubleDefines the typical length of this time unit in seconds without taking into account anomalies like timezone effects or leap seconds.booleanQueries if this time unit is calendrical respective is at least as long as a calendar day.static HijriCalendar.UnitReturns the enum constant of this class with the specified name.static HijriCalendar.Unit[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.EnumcompareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
- 
Enum Constant Details- 
YEARS
- 
MONTHS
- 
WEEKS
- 
DAYS
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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
 
- 
getLengthpublic double getLength()Description copied from interface: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. - Specified by:
- getLengthin interface- ChronoUnit
- Returns:
- estimated decimal value in seconds
 
- 
isCalendricalpublic boolean isCalendrical()Description copied from interface: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) >= 0is equivalent tounit.isCalendrical().- Specified by:
- isCalendricalin interface- ChronoUnit
- Returns:
- trueif at least as long as a day else- false
 
- 
betweenCalculates the difference between given islamic dates in this unit. - Parameters:
- start- start date (inclusive)
- end- end date (exclusive)
- variant- variant reference to which both dates will be converted first
- Returns:
- difference counted in this unit
- Since:
- 3.14/4.11
 
- 
betweenEquivalent to between(start, end, variantSource.getVariant()).- Parameters:
- start- start date (inclusive)
- end- end date (exclusive)
- variantSource- variant reference to which both dates will be converted first
- Returns:
- difference counted in this unit
- Since:
- 3.14/4.11
 
 
-