public enum Time extends Enum<Time> implements Unit<Time>
Amount
s.Enum Constant and Description |
---|
DAYS |
HOURS |
MICROSECONDS |
MILLISECONDS |
MINUTES |
NANOSECONDS |
SECONDS |
Modifier and Type | Method and Description |
---|---|
TimeUnit |
getTimeUnit()
Returns the equivalent
TimeUnit . |
double |
multiplier()
Returns the weight of this unit relative to other units in the same hierarchy.
|
String |
toString() |
static Time |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Time[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Time NANOSECONDS
public static final Time MICROSECONDS
public static final Time MILLISECONDS
public static final Time SECONDS
public static final Time MINUTES
public static final Time HOURS
public static final Time DAYS
public static Time[] values()
for (Time c : Time.values()) System.out.println(c);
public static Time 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 double multiplier()
Unit
multiplier
in interface Unit<Time>
public TimeUnit getTimeUnit()
TimeUnit
.Copyright © 2017 Perforce Software. All Rights Reserved.