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 |
|---|
DAY |
DAY_TO_HOUR |
DAY_TO_MINUTE |
DAY_TO_SECOND |
HOUR |
HOUR_TO_MINUTE |
HOUR_TO_SECOND |
MINUTE |
MINUTE_TO_SECOND |
MONTH |
SECOND |
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 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–2016 The Apache Software Foundation. All rights reserved.