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
@Internal public static enum DateTimeUtils.TimeUnitRange extends Enum<DateTimeUtils.TimeUnitRange>
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 Enum Constant Description CENTURY
DAY
DAY_TO_HOUR
DAY_TO_MINUTE
DAY_TO_SECOND
DECADE
DOW
DOY
EPOCH
HOUR
HOUR_TO_MINUTE
HOUR_TO_SECOND
ISODOW
ISOYEAR
MICROSECOND
MILLENNIUM
MILLISECOND
MINUTE
MINUTE_TO_SECOND
MONTH
NANOSECOND
QUARTER
SECOND
WEEK
YEAR
YEAR_TO_MONTH
-
Field Summary
Fields Modifier and Type Field Description DateTimeUtils.TimeUnit
endUnit
DateTimeUtils.TimeUnit
startUnit
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
monthly()
Whether this is in the YEAR-TO-MONTH family of intervals.static DateTimeUtils.TimeUnitRange
of(DateTimeUtils.TimeUnit startUnit, DateTimeUtils.TimeUnit endUnit)
Returns aTimeUnitRange
with a given start and end unit.static DateTimeUtils.TimeUnitRange
valueOf(String name)
Returns 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 Detail
-
YEAR
public static final DateTimeUtils.TimeUnitRange YEAR
-
YEAR_TO_MONTH
public static final DateTimeUtils.TimeUnitRange YEAR_TO_MONTH
-
MONTH
public static final DateTimeUtils.TimeUnitRange MONTH
-
DAY
public static final DateTimeUtils.TimeUnitRange DAY
-
DAY_TO_HOUR
public static final DateTimeUtils.TimeUnitRange DAY_TO_HOUR
-
DAY_TO_MINUTE
public static final DateTimeUtils.TimeUnitRange DAY_TO_MINUTE
-
DAY_TO_SECOND
public static final DateTimeUtils.TimeUnitRange DAY_TO_SECOND
-
HOUR
public static final DateTimeUtils.TimeUnitRange HOUR
-
HOUR_TO_MINUTE
public static final DateTimeUtils.TimeUnitRange HOUR_TO_MINUTE
-
HOUR_TO_SECOND
public static final DateTimeUtils.TimeUnitRange HOUR_TO_SECOND
-
MINUTE
public static final DateTimeUtils.TimeUnitRange MINUTE
-
MINUTE_TO_SECOND
public static final DateTimeUtils.TimeUnitRange MINUTE_TO_SECOND
-
SECOND
public static final DateTimeUtils.TimeUnitRange SECOND
-
ISOYEAR
public static final DateTimeUtils.TimeUnitRange ISOYEAR
-
QUARTER
public static final DateTimeUtils.TimeUnitRange QUARTER
-
WEEK
public static final DateTimeUtils.TimeUnitRange WEEK
-
MILLISECOND
public static final DateTimeUtils.TimeUnitRange MILLISECOND
-
MICROSECOND
public static final DateTimeUtils.TimeUnitRange MICROSECOND
-
NANOSECOND
public static final DateTimeUtils.TimeUnitRange NANOSECOND
-
DOW
public static final DateTimeUtils.TimeUnitRange DOW
-
ISODOW
public static final DateTimeUtils.TimeUnitRange ISODOW
-
DOY
public static final DateTimeUtils.TimeUnitRange DOY
-
EPOCH
public static final DateTimeUtils.TimeUnitRange EPOCH
-
DECADE
public static final DateTimeUtils.TimeUnitRange DECADE
-
CENTURY
public static final DateTimeUtils.TimeUnitRange CENTURY
-
MILLENNIUM
public static final DateTimeUtils.TimeUnitRange MILLENNIUM
-
-
Field Detail
-
startUnit
public final DateTimeUtils.TimeUnit startUnit
-
endUnit
public final DateTimeUtils.TimeUnit endUnit
-
-
Method Detail
-
values
public static DateTimeUtils.TimeUnitRange[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DateTimeUtils.TimeUnitRange c : DateTimeUtils.TimeUnitRange.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DateTimeUtils.TimeUnitRange valueOf(String name)
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 aTimeUnitRange
with 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.
-
-