AnyLogic AnyLogic
Expand
Font size
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

Field Summary

Fields 
static java.util.List<java.lang.Class<? extends IUnits<?>>> ALL_UNIT_TYPES  
Modifier and Type Field Description

Method Summary

All Methods Instance Methods Abstract Methods 
double convertTo​(double value, T units)
Converts the given value from this units to the given units
java.lang.String getName()
Returns human-readable name (e.g.
double modifier​(T units)  
java.lang.String name()
Returns the name of the constant (e.g.
Modifier and Type Method Description

Field Detail

ALL_UNIT_TYPES

@AnyLogicInternalAPI
static final java.util.List<java.lang.Class<? extends IUnits<?>>> ALL_UNIT_TYPES

Method Detail

name

java.lang.String name()
Returns the name of the constant (e.g. "MPS")

getName

java.lang.String getName()
Returns human-readable name (e.g. "meters per second")

modifier

double modifier​(T units)

convertTo

double convertTo​(double value,
                 T units)
Converts the given value from this units to the given units
Parameters:
value - the value, measured in this units
units - units to convert the value to
Returns:
the value, measured in the given units
How can we improve this article?