Package org.apache.flink.table.utils
Enum DateTimeUtils.TimeUnitRange
java.lang.Object
java.lang.Enum<DateTimeUtils.TimeUnitRange>
org.apache.flink.table.utils.DateTimeUtils.TimeUnitRange
- All Implemented Interfaces:
Serializable,Comparable<DateTimeUtils.TimeUnitRange>
- Enclosing class:
- DateTimeUtils
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).
-
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 DateTimeUtils.TimeUnitRangeof(DateTimeUtils.TimeUnit startUnit, DateTimeUtils.TimeUnit endUnit) Returns aTimeUnitRangewith a given start and end unit.static DateTimeUtils.TimeUnitRangeReturns the enum constant of this type with the specified name.static DateTimeUtils.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
public static DateTimeUtils.TimeUnitRange of(DateTimeUtils.TimeUnit startUnit, DateTimeUtils.TimeUnit endUnit) 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.
-