Package org.apache.calcite.avatica.util
Enum TimeUnitRange
- All Implemented Interfaces:
Serializable,Comparable<TimeUnitRange>,java.lang.constant.Constable
A range of time units. The first is more significant than the
other (e.g. year-to-day) or the same as the other (e.g. month).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanmonthly()Whether this is in the YEAR-TO-MONTH family of intervals.static TimeUnitRangeReturns aTimeUnitRangewith a given start and end unit.static TimeUnitRangeReturns the enum constant of this type with the specified name.static TimeUnitRange[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
YEAR
-
YEAR_TO_MONTH
-
MONTH
-
DAY
-
DAY_TO_HOUR
-
DAY_TO_MINUTE
-
DAY_TO_SECOND
-
HOUR
-
HOUR_TO_MINUTE
-
HOUR_TO_SECOND
-
MINUTE
-
MINUTE_TO_SECOND
-
SECOND
-
ISOYEAR
-
QUARTER
-
WEEK
-
MILLISECOND
-
MICROSECOND
-
NANOSECOND
-
DOW
-
ISODOW
-
DOY
-
EPOCH
-
DECADE
-
CENTURY
-
MILLENNIUM
-
-
Field Details
-
startUnit
-
endUnit
-
-
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
-
of
Returns aTimeUnitRangewith a given start and end unit.- Parameters:
startUnit- Start unitendUnit- End unit- Returns:
- Time unit range, or null if not valid
-
monthly
public boolean monthly()Whether this is in the YEAR-TO-MONTH family of intervals.
-