Class AsaMemoryUtils.Convert

  • Enclosing class:
    AsaMemoryUtils

    public static class AsaMemoryUtils.Convert
    extends Object
    a static class used in converting between bytes, megabytes, and gigabytes
    • Constructor Detail

      • Convert

        public Convert()
    • Method Detail

      • bytesToMegabytes

        public static double bytesToMegabytes​(long bytes)
        Converts the specified long value from bytes to megabytes
        Parameters:
        bytes - a long value
        Returns:
        the number of megabytes in bytes
      • megabytesToBytes

        public static double megabytesToBytes​(double megabytes)
        Converts the specified double value from megabytes to bytes
        Parameters:
        megabytes - a double value
        Returns:
        the number of bytes in megabytes
      • bytesToGigabytes

        public static double bytesToGigabytes​(long bytes)
        Converts the specified long value from bytes to gigabytes
        Parameters:
        bytes - a long value
        Returns:
        the number of gigabytes in bytes
      • gigabytesToBytes

        public static double gigabytesToBytes​(double gigabytes)
        Converts the specified double value from gigabytes to bytes
        Parameters:
        gigabytes - a double value
        Returns:
        the number of bytes in gigabytes
      • megabytesToGigabytes

        public static double megabytesToGigabytes​(double megabytes)
        Converts the specified double value from megabytes to gigabytes
        Parameters:
        megabytes - a double value
        Returns:
        the number of gigabytes in megabytes
      • gigabytesToMegabytes

        public static double gigabytesToMegabytes​(double gigabytes)
        Converts the specified double value from gigabytes to megabytes
        Parameters:
        gigabytes - a double value
        Returns:
        the number of megabytes in gigabytes