Enum Constant and Description |
---|
HOURS |
MILLISECONDS |
MINUTES |
SECONDS |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLongName()
Returns the string long name of the unit.
|
long |
getMsFactor()
Returns the multiplication factor for this unit to
convert a corresponding value to milliseconds.
|
java.lang.String |
getShortName()
Returns the string short name of the unit.
|
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 MILLISECONDS
public static final TimeUnit SECONDS
public static final TimeUnit MINUTES
public static final TimeUnit HOURS
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 nullpublic java.lang.String getLongName()
public java.lang.String getShortName()
public long getMsFactor()