Package com.landawn.abacus.util
Enum Class CalendarUnit
- All Implemented Interfaces:
Serializable
,Comparable<CalendarUnit>
,Constable
The Enum CalendarUnit.
- Since:
- 0.8
- Author:
- Haiyang Li
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionit has the same int value asCalendar.DAY_OF_MONTH
it has the same int value asCalendar.HOUR_OF_DAY
it has the same int value asCalendar.MILLISECOND
it has the same int value asCalendar.MINUTE
it has the same int value asCalendar.MONTH
it has the same int value asCalendar.SECOND
it has the same int value asCalendar.WEEK_OF_YEAR
it has the same int value asCalendar.YEAR
-
Method Summary
Modifier and TypeMethodDescriptionint
intValue()
long
toMillis
(long amount) static CalendarUnit
valueOf
(int intValue) Returns the enum constant of this class with the specified name.static CalendarUnit
Returns the enum constant of this class with the specified name.static CalendarUnit[]
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
-
Enum Constant Details
-
MILLISECOND
it has the same int value asCalendar.MILLISECOND
- See Also:
-
SECOND
it has the same int value asCalendar.SECOND
- See Also:
-
MINUTE
it has the same int value asCalendar.MINUTE
- See Also:
-
HOUR
it has the same int value asCalendar.HOUR_OF_DAY
- See Also:
-
DAY
it has the same int value asCalendar.DAY_OF_MONTH
- See Also:
-
WEEK
it has the same int value asCalendar.WEEK_OF_YEAR
- See Also:
-
MONTH
it has the same int value asCalendar.MONTH
- See Also:
-
YEAR
it has the same int value asCalendar.YEAR
- See Also:
-
-
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
-
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:
intValue
- 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
-
intValue
public int intValue() -
toMillis
public long toMillis(long amount) - Parameters:
amount
-- Returns:
-