public enum TimeUnitRange extends Enum<TimeUnitRange>
| Modifier and Type | Class and Description |
|---|---|
private static class |
TimeUnitRange.Pair<E>
Immutable pair of values of the same type.
|
| 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 |
MICROSECOND |
MILLENNIUM |
MILLISECOND |
MINUTE |
MINUTE_TO_SECOND |
MONTH |
QUARTER |
SECOND |
WEEK |
YEAR |
YEAR_TO_MONTH |
| Modifier and Type | Field and Description |
|---|---|
TimeUnit |
endUnit |
private static Map<TimeUnitRange.Pair<TimeUnit>,TimeUnitRange> |
MAP |
TimeUnit |
startUnit |
| Modifier and Type | Method and Description |
|---|---|
private static Map<TimeUnitRange.Pair<TimeUnit>,TimeUnitRange> |
createMap() |
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 QUARTER
public static final TimeUnitRange WEEK
public static final TimeUnitRange MILLISECOND
public static final TimeUnitRange MICROSECOND
public static final TimeUnitRange DOW
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 final TimeUnit startUnit
public final TimeUnit endUnit
private static final Map<TimeUnitRange.Pair<TimeUnit>,TimeUnitRange> MAP
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 unitprivate static Map<TimeUnitRange.Pair<TimeUnit>,TimeUnitRange> createMap()
public boolean monthly()
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.