Package com.anylogic.engine
- Type Parameters:
T
- the self-type of units enum
- All Known Implementing Classes:
AccelerationUnits
,AmountUnits
,AngleUnits
,AreaUnits
,FlowRateUnits
,LengthUnits
,RateUnits
,RotationSpeedUnits
,SpeedUnits
,TimeUnits
public interface IUnits<T extends IUnits<T>>
Base interface for all units enumerations
- Author:
- AnyLogic North America, LLC https://anylogic.com
Modifier and Type | Field | Description |
---|---|---|
static final List<Class<? extends IUnits<?>>> | ALL_UNIT_TYPES |
@AnyLogicInternalAPI static final List<Class<? extends IUnits<?>>> ALL_UNIT_TYPES
String name()
Returns the name of the constant (e.g. "MPS")
String getName()
Returns human-readable name (e.g. "meters per second")
double modifier(T units)
double convertTo(double value, T units)
Converts the given value from this units to the given
units
- Parameters:
value
- the value, measured in this unitsunits
- units to convert the value to- Returns:
- the value, measured in the given
units