public enum CalendarUnit extends Enum<CalendarUnit>
Modifier and Type | Method and Description |
---|---|
static CalendarUnit |
fromValue(String unitName) |
String |
getUnitName() |
String |
toString() |
static CalendarUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CalendarUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CalendarUnit DAY
public static final CalendarUnit WEEK
public static final CalendarUnit MONTH
public static final CalendarUnit QUARTER
public static final CalendarUnit SEMI
public static final CalendarUnit YEAR
public static CalendarUnit[] values()
for (CalendarUnit c : CalendarUnit.values()) System.out.println(c);
public static CalendarUnit valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getUnitName()
public static CalendarUnit fromValue(String unitName)
public String toString()
toString
in class Enum<CalendarUnit>
Copyright © 2017. All rights reserved.