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

Modifier and TypeFieldDescription
static final List<Class<? extends IUnits<?>>>ALL_UNIT_TYPES 

Method Summary

Modifier and TypeMethodDescription
doubleconvertTo(double value, T units)
Converts the given value from this units to the given units
StringgetName()
Returns human-readable name (e.g.
doublemodifier(T units) 
Stringname()
Returns the name of the constant (e.g.

Field Details

ALL_UNIT_TYPES

@AnyLogicInternalAPI
static final List<Class<? extends IUnits<?>>> ALL_UNIT_TYPES

Method Details

name

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

getName

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