Package org.dashbuilder.dataset.group
Enum DateIntervalType
- java.lang.Object
-
- java.lang.Enum<DateIntervalType>
-
- org.dashbuilder.dataset.group.DateIntervalType
-
- All Implemented Interfaces:
Serializable,Comparable<DateIntervalType>
public enum DateIntervalType extends Enum<DateIntervalType>
Type of data intervals
-
-
Field Summary
Fields Modifier and Type Field Description static List<DateIntervalType>FIXED_INTERVALS_SUPPORTEDList of the only DateIntervalType's supported as fixed date intervals
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intcompare(DateIntervalType interval1, DateIntervalType interval2)static DateIntervalTypegetByIndex(int index)static DateIntervalTypegetByName(String interval)static longgetDurationInMillis(DateIntervalType type)intgetIndex()static DateIntervalTypevalueOf(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.
-
-
-
Enum Constant Detail
-
MILLISECOND
public static final DateIntervalType MILLISECOND
-
HUNDRETH
public static final DateIntervalType HUNDRETH
-
TENTH
public static final DateIntervalType TENTH
-
SECOND
public static final DateIntervalType SECOND
-
MINUTE
public static final DateIntervalType MINUTE
-
HOUR
public static final DateIntervalType HOUR
-
DAY
public static final DateIntervalType DAY
-
DAY_OF_WEEK
public static final DateIntervalType DAY_OF_WEEK
-
WEEK
public static final DateIntervalType WEEK
-
MONTH
public static final DateIntervalType MONTH
-
QUARTER
public static final DateIntervalType QUARTER
-
YEAR
public static final DateIntervalType YEAR
-
DECADE
public static final DateIntervalType DECADE
-
CENTURY
public static final DateIntervalType CENTURY
-
MILLENIUM
public static final DateIntervalType MILLENIUM
-
-
Field Detail
-
FIXED_INTERVALS_SUPPORTED
public static List<DateIntervalType> FIXED_INTERVALS_SUPPORTED
List of the only DateIntervalType's supported as fixed date intervals
-
-
Method Detail
-
values
public static DateIntervalType[] 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 (DateIntervalType c : DateIntervalType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DateIntervalType 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
-
getIndex
public int getIndex()
-
getByIndex
public static DateIntervalType getByIndex(int index)
-
getByName
public static DateIntervalType getByName(String interval)
-
compare
public static int compare(DateIntervalType interval1, DateIntervalType interval2)
-
getDurationInMillis
public static long getDurationInMillis(DateIntervalType type)
-
-