public enum DurationUnit extends Enum<DurationUnit>
| Enum Constant and Description |
|---|
DAYS |
HOURS |
MILLI_SECONDS |
MINUTES |
MONTHS |
NANO_SECONDS |
SECONDS |
YEARS |
| Modifier and Type | Method and Description |
|---|---|
int |
count() |
int |
ordinal() |
String |
toString() |
static DurationUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DurationUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DurationUnit NANO_SECONDS
public static final DurationUnit MILLI_SECONDS
public static final DurationUnit SECONDS
public static final DurationUnit MINUTES
public static final DurationUnit HOURS
public static final DurationUnit DAYS
public static final DurationUnit MONTHS
public static final DurationUnit YEARS
public static DurationUnit[] values()
for (DurationUnit c : DurationUnit.values()) System.out.println(c);
public static DurationUnit 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 int count()
public int ordinal()
Copyright © 2021. All rights reserved.