public enum DateRangeUnit extends java.lang.Enum<DateRangeUnit>
Enum Constant and Description |
---|
DAYS |
HOURS |
MINUTES |
MONTHS |
WEEKS |
YEARS |
Modifier and Type | Method and Description |
---|---|
DateTimeFormatter |
getFormatter() |
java.lang.String |
getIdentifier() |
static DateRangeUnit |
getUnitForIdentifier(java.lang.String identifier) |
static DateRangeUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DateRangeUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DateRangeUnit MINUTES
public static final DateRangeUnit HOURS
public static final DateRangeUnit DAYS
public static final DateRangeUnit WEEKS
public static final DateRangeUnit MONTHS
public static final DateRangeUnit YEARS
public static DateRangeUnit[] values()
for (DateRangeUnit c : DateRangeUnit.values()) System.out.println(c);
public static DateRangeUnit valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getIdentifier()
public DateTimeFormatter getFormatter()
public static DateRangeUnit getUnitForIdentifier(java.lang.String identifier)