public enum TimePeriod extends Enum<TimePeriod>
TimePeriod class.
Enum Constant and Description |
---|
DAY |
HOUR |
MILLISECOND |
MINUTE |
MONTH |
QUARTER |
SECOND |
WEEK |
YEAR |
Modifier and Type | Method and Description |
---|---|
static TimePeriod |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TimePeriod[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TimePeriod YEAR
public static final TimePeriod QUARTER
public static final TimePeriod MONTH
public static final TimePeriod WEEK
public static final TimePeriod DAY
public static final TimePeriod HOUR
public static final TimePeriod MINUTE
public static final TimePeriod SECOND
public static final TimePeriod MILLISECOND
public static TimePeriod[] values()
for (TimePeriod c : TimePeriod.values()) System.out.println(c);
public static TimePeriod 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 nullCopyright © 2010–2021. All rights reserved.