public enum TimeUnitRange extends Enum<TimeUnitRange>
Enum Constant and 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 |
Modifier and Type | Method and Description |
---|---|
boolean |
monthly()
Whether this is in the YEAR-TO-MONTH family of intervals.
|
static TimeUnitRange |
of(TimeUnit startUnit,
TimeUnit endUnit)
Returns a
TimeUnitRange with a given start and end unit. |
static TimeUnitRange |
valueOf(String name)
Returns 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.
|
public static final TimeUnitRange YEAR
public static final TimeUnitRange YEAR_TO_MONTH
public static final TimeUnitRange MONTH
public static final TimeUnitRange DAY
public static final TimeUnitRange DAY_TO_HOUR
public static final TimeUnitRange DAY_TO_MINUTE
public static final TimeUnitRange DAY_TO_SECOND
public static final TimeUnitRange HOUR
public static final TimeUnitRange HOUR_TO_MINUTE
public static final TimeUnitRange HOUR_TO_SECOND
public static final TimeUnitRange MINUTE
public static final TimeUnitRange MINUTE_TO_SECOND
public static final TimeUnitRange SECOND
public static final TimeUnitRange ISOYEAR
public static final TimeUnitRange QUARTER
public static final TimeUnitRange WEEK
public static final TimeUnitRange MILLISECOND
public static final TimeUnitRange MICROSECOND
public static final TimeUnitRange NANOSECOND
public static final TimeUnitRange DOW
public static final TimeUnitRange ISODOW
public static final TimeUnitRange DOY
public static final TimeUnitRange EPOCH
public static final TimeUnitRange DECADE
public static final TimeUnitRange CENTURY
public static final TimeUnitRange MILLENNIUM
public static TimeUnitRange[] values()
for (TimeUnitRange c : TimeUnitRange.values()) System.out.println(c);
public static TimeUnitRange valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static TimeUnitRange of(TimeUnit startUnit, TimeUnit endUnit)
TimeUnitRange
with a given start and end unit.startUnit
- Start unitendUnit
- End unitpublic boolean monthly()
Copyright © 2012-2024 Apache Software Foundation. All Rights Reserved.