Package org.cloudbus.cloudsim.util
Class Conversion
java.lang.Object
org.cloudbus.cloudsim.util.Conversion
Utility class that provides a set of methods for general data conversion.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
A value that represents 100% in a scale from 0 to 1.static final int
One million in absolute value, usually used to convert to and from Number of Instructions (I) and Million Instructions (MI) units. -
Method Summary
Modifier and TypeMethodDescriptionstatic int
boolToInt
(boolean bool) Converts a boolean value to int
-
Field Details
-
HUNDRED_PERCENT
public static final double HUNDRED_PERCENTA value that represents 100% in a scale from 0 to 1.- See Also:
-
MILLION
public static final int MILLIONOne million in absolute value, usually used to convert to and from Number of Instructions (I) and Million Instructions (MI) units.- See Also:
-
-
Method Details
-
boolToInt
public static int boolToInt(boolean bool) Converts a boolean value to int- Parameters:
bool
- the boolean value to convert- Returns:
- 1 if the boolean value is true, 0 otherwise.
-