public enum GranularityType extends Enum<GranularityType>
Enum Constant and Description |
---|
ALL |
DAY |
FIFTEEN_MINUTE |
FIVE_MINUTE |
HOUR |
MINUTE |
MONTH |
NONE |
QUARTER |
SECOND |
SIX_HOUR |
TEN_MINUTE |
THIRTY_MINUTE |
WEEK |
YEAR |
Modifier and Type | Method and Description |
---|---|
static GranularityType |
fromPeriod(org.joda.time.Period period)
Note: This is only an estimate based on the values in period.
|
org.joda.time.DateTime |
getDateTime(Integer[] vals) |
String |
getDefaultFormat() |
Granularity |
getDefaultGranularity() |
String |
getHiveFormat() |
String |
getLowerDefaultFormat() |
static boolean |
isStandard(Granularity granularity)
For a select subset of granularites, users can specify them directly as string.
|
static GranularityType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GranularityType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GranularityType SECOND
public static final GranularityType MINUTE
public static final GranularityType FIVE_MINUTE
public static final GranularityType TEN_MINUTE
public static final GranularityType FIFTEEN_MINUTE
public static final GranularityType THIRTY_MINUTE
public static final GranularityType HOUR
public static final GranularityType SIX_HOUR
public static final GranularityType DAY
public static final GranularityType WEEK
public static final GranularityType MONTH
public static final GranularityType QUARTER
public static final GranularityType YEAR
public static final GranularityType ALL
public static final GranularityType NONE
public static GranularityType[] values()
for (GranularityType c : GranularityType.values()) System.out.println(c);
public static GranularityType 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 Granularity getDefaultGranularity()
public org.joda.time.DateTime getDateTime(Integer[] vals)
public static boolean isStandard(Granularity granularity)
public static GranularityType fromPeriod(org.joda.time.Period period)
public String getHiveFormat()
public String getLowerDefaultFormat()
public String getDefaultFormat()
Copyright © 2011–2018. All rights reserved.