Enum ChronoUnitEnum
- All Implemented Interfaces:
Serializable
,Comparable<ChronoUnitEnum>
,Constable
A component of a datetime. May belong to a type of calendar. Also contains
a list of parent values. For example months are in a year. A datetime can be
reconstructed from one or more
ChronUnitEnum
items along with
their associated values.
Some ChronoUnitEnum
items conflict with others.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionGet the set of calendars that this value can be in.Get the ChronoUnit value that corresponds to this value.boolean
isCompatible
(Set<ChronoUnitEnum> units) Checks if the current item can be added tounits
without causing any conflicts.static ChronoUnitEnum
Returns the enum constant of this type with the specified name.static ChronoUnitEnum[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ERAS
-
CENTURIES
-
YEARS_ISO_8601
-
YEARS_IN_MILLENIA_ISO_8601
-
YEARS_IN_CENTURY_ISO_8601
-
DAYS_IN_YEAR_ISO_8601
-
WEEKS_IN_YEAR_ISO_8601
-
DAYS_JULIAN
-
YEARS
-
YEARS_IN_MILLENIA
-
YEARS_IN_CENTURY
-
MONTHS_IN_YEAR
-
DAYS_IN_YEAR
-
DAYS_IN_MONTH
-
WEEKS_IN_YEAR
-
WEEKS_IN_MONTH
-
DAYS_IN_WEEK
-
HOURS_IN_DAY
-
HALF_DAYS
-
HOURS_IN_HALF_DAY
-
MINUTES_IN_HOUR
-
SECONDS_IN_DAY
-
SECONDS_IN_MINUTE
-
MILLIS
-
MICROS
-
TENTHS_OF_SECOND
-
HUNDREDTHS_OF_SECOND
-
THOUSANDTHS_OF_SECOND
-
TENTHS_OF_MS
-
HUNDREDTHS_OF_MS
-
THOUSANDTHS_OF_MS
-
TIMEZONE_HOURS
-
TIMEZONE_MINUTES
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getChronoUnit
Get the ChronoUnit value that corresponds to this value.- Returns:
- a ChronoUnit value
-
getCalendars
Get the set of calendars that this value can be in.- Returns:
- set of calendars that this value can be in
-
isCompatible
Checks if the current item can be added tounits
without causing any conflicts.- Parameters:
units
- aSet
of items to test against- Returns:
true
if this item does not conflict withunits
-