Package net.pricefx.common.util
Enum CalendarUtil.TimeUnit
- Object
-
- Enum<CalendarUtil.TimeUnit>
-
- TimeUnit
-
- All Implemented Interfaces:
Serializable
,Comparable<CalendarUtil.TimeUnit>
- Enclosing class:
- CalendarUtil
public static enum CalendarUtil.TimeUnit extends Enum<CalendarUtil.TimeUnit>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
endDate(Date date)
static CalendarUtil.TimeUnit
get(String unit)
static CalendarUtil.TimeUnit
get(String unit, CalendarUtil.TimeUnit defaultValue)
String
getName()
Date
offsetDate(Date date, int offset)
Date
startDate(Date date)
String
toString()
static CalendarUtil.TimeUnit
valueOf(String name)
Returns the enum constant of this type with the specified name.static CalendarUtil.TimeUnit[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DAY
public static final CalendarUtil.TimeUnit DAY
-
WEEK
public static final CalendarUtil.TimeUnit WEEK
-
MONTH
public static final CalendarUtil.TimeUnit MONTH
-
QUARTER
public static final CalendarUtil.TimeUnit QUARTER
-
YEAR
public static final CalendarUtil.TimeUnit YEAR
-
-
Method Detail
-
values
public static CalendarUtil.TimeUnit[] 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 (CalendarUtil.TimeUnit c : CalendarUtil.TimeUnit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CalendarUtil.TimeUnit 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
-
getName
public String getName()
-
toString
public String toString()
- Overrides:
toString
in classEnum<CalendarUtil.TimeUnit>
-
get
public static CalendarUtil.TimeUnit get(String unit, CalendarUtil.TimeUnit defaultValue)
-
get
public static CalendarUtil.TimeUnit get(String unit)
-
-