Enum Constant and Description |
---|
Day
Specifies days.
|
Hour
Specifies hours.
|
Minute
Specifies minutes.
|
Month
Specifies months.
|
Second
Specifies seconds.
|
Week
Specifies weeks.
|
Year
Specifies years.
|
Modifier and Type | Method and Description |
---|---|
static TimeUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TimeUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TimeUnit Second
public static final TimeUnit Minute
public static final TimeUnit Hour
public static final TimeUnit Day
public static final TimeUnit Week
public static final TimeUnit Month
public static final TimeUnit Year
public static TimeUnit[] values()
for (TimeUnit c : TimeUnit.values()) System.out.println(c);
public static TimeUnit 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 null