Package uk.gov.gchq.gaffer.time
Enum CommonTimeUtil.TimeBucket
- java.lang.Object
-
- java.lang.Enum<CommonTimeUtil.TimeBucket>
-
- uk.gov.gchq.gaffer.time.CommonTimeUtil.TimeBucket
-
- All Implemented Interfaces:
Serializable
,Comparable<CommonTimeUtil.TimeBucket>
- Enclosing class:
- CommonTimeUtil
public static enum CommonTimeUtil.TimeBucket extends Enum<CommonTimeUtil.TimeBucket>
Type representing a "bucket" of time. Note thatMILLISECOND
is at the end as it was added later and some serialisers use the ordinal associated to the enum. Adding it at the end should avoid breaking existing serialisers.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CommonTimeUtil.TimeBucket
valueOf(String name)
Returns the enum constant of this type with the specified name.static CommonTimeUtil.TimeBucket[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SECOND
public static final CommonTimeUtil.TimeBucket SECOND
-
MINUTE
public static final CommonTimeUtil.TimeBucket MINUTE
-
HOUR
public static final CommonTimeUtil.TimeBucket HOUR
-
DAY
public static final CommonTimeUtil.TimeBucket DAY
-
WEEK
public static final CommonTimeUtil.TimeBucket WEEK
-
MONTH
public static final CommonTimeUtil.TimeBucket MONTH
-
YEAR
public static final CommonTimeUtil.TimeBucket YEAR
-
MILLISECOND
public static final CommonTimeUtil.TimeBucket MILLISECOND
-
-
Method Detail
-
values
public static CommonTimeUtil.TimeBucket[] 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 (CommonTimeUtil.TimeBucket c : CommonTimeUtil.TimeBucket.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CommonTimeUtil.TimeBucket 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
-
-