public enum TimeUnits extends java.lang.Enum<TimeUnits> implements IUnits<TimeUnits>
Enum Constant and Description |
---|
DAY
Day
|
HOUR
Hour
|
MILLISECOND
Millisecond
|
MINUTE
Minute
|
MONTH
Month
|
SECOND
Second
|
WEEK
Week
|
YEAR
Year
|
ALL_UNIT_TYPES
Modifier and Type | Method and Description |
---|---|
double |
convertTo(double value,
TimeUnits units)
Converts the given value from this units to the given
units |
java.lang.String |
getName()
Returns human-readable name (e.g.
|
double |
modifier(TimeUnits units) |
long |
toMilliseconds() |
static TimeUnits |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TimeUnits[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TimeUnits MILLISECOND
public static final TimeUnits SECOND
public static final TimeUnits MINUTE
public static final TimeUnits HOUR
public static final TimeUnits DAY
public static final TimeUnits WEEK
public static final TimeUnits MONTH
public static final TimeUnits YEAR
public static TimeUnits[] values()
for (TimeUnits c : TimeUnits.values()) System.out.println(c);
public static TimeUnits 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 getName()
IUnits
public double modifier(TimeUnits units)
public double convertTo(double value, TimeUnits units)
IUnits
units
@AnyLogicLegacyAPI public long toMilliseconds()
Copyright © AnyLogic North America, LLC. All Rights Reserved.