Package org.cyclos.model.utils
Enum PeriodType
- java.lang.Object
-
- java.lang.Enum<PeriodType>
-
- org.cyclos.model.utils.PeriodType
-
- All Implemented Interfaces:
Serializable,Comparable<PeriodType>
public enum PeriodType extends Enum<PeriodType>
A type of period
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CURRENT_DAYThe current dayCURRENT_WEEKThe current weekDAYA full dayMONTHA full monthMONTH_RANGEA month range, such as last 6 monthsQUARTERA quarterWEEK_OF_YEARA week of the yearYEARA full year
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Pair<Integer,Integer>getBoundaries()IntegergetLowerBoundary()IntegergetUpperBoundary()static PeriodTypevalueOf(String name)Returns the enum constant of this type with the specified name.static PeriodType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
YEAR
public static final PeriodType YEAR
A full year
-
QUARTER
public static final PeriodType QUARTER
A quarter
-
MONTH
public static final PeriodType MONTH
A full month
-
MONTH_RANGE
public static final PeriodType MONTH_RANGE
A month range, such as last 6 months
-
WEEK_OF_YEAR
public static final PeriodType WEEK_OF_YEAR
A week of the year
-
DAY
public static final PeriodType DAY
A full day
-
CURRENT_WEEK
public static final PeriodType CURRENT_WEEK
The current week
-
CURRENT_DAY
public static final PeriodType CURRENT_DAY
The current day
-
-
Method Detail
-
values
public static PeriodType[] 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 (PeriodType c : PeriodType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PeriodType 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
-
getLowerBoundary
public Integer getLowerBoundary()
-
getUpperBoundary
public Integer getUpperBoundary()
-
-