public enum AmountUnits extends java.lang.Enum<AmountUnits> implements IUnits<AmountUnits>
Enum Constant and Description |
---|
CUBIC_METER
Cubic meter
|
KILOGRAM
Kilogram
|
LITER
Liter
|
OIL_BARREL
Oil barrel
|
TON
Ton
|
ALL_UNIT_TYPES
Modifier and Type | Method and Description |
---|---|
double |
convertTo(double value,
AmountUnits units)
Converts the given value from this units to the given
units |
AmountType |
getAmountType() |
java.lang.String |
getName()
Returns human-readable name (e.g.
|
double |
modifier(AmountUnits units) |
static AmountUnits |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static AmountUnits[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AmountUnits LITER
public static final AmountUnits OIL_BARREL
public static final AmountUnits CUBIC_METER
public static final AmountUnits KILOGRAM
public static final AmountUnits TON
public static AmountUnits[] values()
for (AmountUnits c : AmountUnits.values()) System.out.println(c);
public static AmountUnits 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
getName
in interface IUnits<AmountUnits>
public double modifier(AmountUnits units)
modifier
in interface IUnits<AmountUnits>
public double convertTo(double value, AmountUnits units)
IUnits
units
convertTo
in interface IUnits<AmountUnits>
value
- the value, measured in this unitsunits
- units to convert the value tounits
@AnyLogicInternalAPI public AmountType getAmountType()
Copyright © AnyLogic North America, LLC. All Rights Reserved.