public enum DateIntervalType extends Enum<DateIntervalType>
| Enum Constant and Description |
|---|
CENTURY |
DAY |
DAY_OF_WEEK |
DECADE |
HOUR |
HUNDRETH |
MILLENIUM |
MILLISECOND |
MINUTE |
MONTH |
QUARTER |
SECOND |
TENTH |
WEEK |
YEAR |
| Modifier and Type | Field and Description |
|---|---|
static List<DateIntervalType> |
FIXED_INTERVALS_SUPPORTED
List of the only DateIntervalType's supported as fixed date intervals
|
| Modifier and Type | Method and Description |
|---|---|
static int |
compare(DateIntervalType interval1,
DateIntervalType interval2) |
static DateIntervalType |
getByIndex(int index) |
static DateIntervalType |
getByName(String interval) |
static long |
getDurationInMillis(DateIntervalType type) |
int |
getIndex() |
static DateIntervalType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DateIntervalType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DateIntervalType MILLISECOND
public static final DateIntervalType HUNDRETH
public static final DateIntervalType TENTH
public static final DateIntervalType SECOND
public static final DateIntervalType MINUTE
public static final DateIntervalType HOUR
public static final DateIntervalType DAY
public static final DateIntervalType DAY_OF_WEEK
public static final DateIntervalType WEEK
public static final DateIntervalType MONTH
public static final DateIntervalType QUARTER
public static final DateIntervalType YEAR
public static final DateIntervalType DECADE
public static final DateIntervalType CENTURY
public static final DateIntervalType MILLENIUM
public static List<DateIntervalType> FIXED_INTERVALS_SUPPORTED
public static DateIntervalType[] values()
for (DateIntervalType c : DateIntervalType.values()) System.out.println(c);
public static DateIntervalType 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 int getIndex()
public static DateIntervalType getByIndex(int index)
public static DateIntervalType getByName(String interval)
public static int compare(DateIntervalType interval1, DateIntervalType interval2)
public static long getDurationInMillis(DateIntervalType type)
Copyright © 2017–2021 JBoss by Red Hat. All rights reserved.