Package org.openl.rules.util.dates
Enum DateInterval.Unit
- java.lang.Object
-
- java.lang.Enum<DateInterval.Unit>
-
- org.openl.rules.util.dates.DateInterval.Unit
-
- All Implemented Interfaces:
Serializable,Comparable<DateInterval.Unit>
- Enclosing class:
- DateInterval
public static enum DateInterval.Unit extends Enum<DateInterval.Unit>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DAYSDAYS_EXCLUDE_MONTHS_AND_YEARSDAYS_EXCLUDE_YEARSMONTHSMONTHS_EXCLUDE_YEARSMONTHS_FRACTIONALMONTHS_FRACTIONAL_EXCLUDE_YEARSWEEKSWEEKS_FRACTIONALYEARSYEARS_FRACTIONAL
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DateInterval.UnitgetUnit(String unitName)static DateInterval.UnitvalueOf(String name)Returns the enum constant of this type with the specified name.static DateInterval.Unit[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
YEARS
public static final DateInterval.Unit YEARS
-
MONTHS
public static final DateInterval.Unit MONTHS
-
WEEKS
public static final DateInterval.Unit WEEKS
-
DAYS
public static final DateInterval.Unit DAYS
-
DAYS_EXCLUDE_MONTHS_AND_YEARS
public static final DateInterval.Unit DAYS_EXCLUDE_MONTHS_AND_YEARS
-
MONTHS_EXCLUDE_YEARS
public static final DateInterval.Unit MONTHS_EXCLUDE_YEARS
-
DAYS_EXCLUDE_YEARS
public static final DateInterval.Unit DAYS_EXCLUDE_YEARS
-
YEARS_FRACTIONAL
public static final DateInterval.Unit YEARS_FRACTIONAL
-
MONTHS_FRACTIONAL
public static final DateInterval.Unit MONTHS_FRACTIONAL
-
WEEKS_FRACTIONAL
public static final DateInterval.Unit WEEKS_FRACTIONAL
-
MONTHS_FRACTIONAL_EXCLUDE_YEARS
public static final DateInterval.Unit MONTHS_FRACTIONAL_EXCLUDE_YEARS
-
-
Method Detail
-
values
public static DateInterval.Unit[] 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 (DateInterval.Unit c : DateInterval.Unit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DateInterval.Unit 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
-
getUnit
public static DateInterval.Unit getUnit(String unitName)
-
-