AnyLogic
Expand
Font size
All Implemented Interfaces:
IUnits<RateUnits>, Serializable, Comparable<RateUnits>, Constable

public enum RateUnits
extends Enum<RateUnits>
implements IUnits<RateUnits>
Standard AnyLogic rate units, should be used in specific functions and parameters which work with units.
Author:
AnyLogic North America, LLC https://anylogic.com

Nested Class Summary

Nested classes/interfaces inherited from class java.lang.Enum

Enum.EnumDesc<E extends Enum<E>>

Field Summary

Fields inherited from interface com.anylogic.engine.IUnits

ALL_UNIT_TYPES

Method Summary

Modifier and TypeMethodDescription
doubleconvertTo(double value, RateUnits units)
Converts the given value from this units to the given units
StringgetName()
Returns human-readable name (e.g.
TimeUnitsgetTimeUnits()
Returns the base time unit of this rate unit
doublemodifier(RateUnits units) 
static RateUnitsvalueOf(String name)
Returns the enum constant of this class with the specified name.
static RateUnits[]values()
Returns an array containing the constants of this enum class, in the order they are declared.

Methods inherited from class java.lang.Enum

compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

Methods inherited from class java.lang.Object

getClass, notify, notifyAll, wait, wait, wait

Methods inherited from interface com.anylogic.engine.IUnits

name

Method Details

values

public static RateUnits[] values()
Returns an array containing the constants of this enum class, in the order they are declared.
Returns:
an array containing the constants of this enum class, in the order they are declared

valueOf

public static RateUnits valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum class has no constant with the specified name
NullPointerException - if the argument is null

getName

public String getName()
Description copied from interface: IUnits
Returns human-readable name (e.g. "meters per second")
Specified by:
getName in interface IUnits<RateUnits>

modifier

public double modifier(RateUnits units)
Specified by:
modifier in interface IUnits<RateUnits>

convertTo

public double convertTo(double value,
 RateUnits units)
Description copied from interface: IUnits
Converts the given value from this units to the given units
Specified by:
convertTo in interface IUnits<RateUnits>
Parameters:
value - the value, measured in this units
units - units to convert the value to
Returns:
the value, measured in the given units

getTimeUnits

@AnyLogicInternalAPI
public TimeUnits getTimeUnits()
Returns the base time unit of this rate unit