- All Implemented Interfaces:
Serializable, Comparable<TimeUnit>, java.lang.constant.Constable
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDay time unit with day-level labelHour time unit with hour-level labelMinute time unit with minute-level labelMonth time unit with month-level labelSecond time unit with second-level labelWeek time unit with week-level labelYear time unit with year-level labelConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionabstract StringgetLabel()Get the label format pattern for this time unit.static TimeUnitresolveUnit(int unitKey) Map aCalendarfield constant to the matching time unit.static TimeUnitReturns the enum constant of this class with the specified name.static TimeUnit[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
SECOND
Second time unit with second-level labelMINUTE
Minute time unit with minute-level labelHOUR
Hour time unit with hour-level labelDAY
Day time unit with day-level labelWEEK
Week time unit with week-level labelMONTH
Month time unit with month-level labelYEAR
Year time unit with year-level label
Constructor Details
TimeUnit
private TimeUnit()
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
getLabel
Get the label format pattern for this time unit.- Returns:
- the date format pattern for this unit's axis labels
resolveUnit