Class Conversion

java.lang.Object
org.cloudbus.cloudsim.util.Conversion

public final class Conversion extends Object
Utility class that provides a set of methods for general data conversion.
Author:
Manoel Campos da Silva Filho
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static 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 Type
    Method
    Description
    static int
    boolToInt(boolean bool)
    Converts a boolean value to int

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • HUNDRED_PERCENT

      public static final double HUNDRED_PERCENT
      A value that represents 100% in a scale from 0 to 1.
      See Also:
    • MILLION

      public static final int MILLION
      One 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.