Class AsaMemoryUtils.Convert

java.lang.Object
ucar.nc2.dt.ugrid.utils.AsaMemoryUtils.Convert
Enclosing class:
AsaMemoryUtils

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    bytesToGigabytes(long bytes)
    Converts the specified long value from bytes to gigabytes
    static double
    bytesToMegabytes(long bytes)
    Converts the specified long value from bytes to megabytes
    static double
    gigabytesToBytes(double gigabytes)
    Converts the specified double value from gigabytes to bytes
    static double
    gigabytesToMegabytes(double gigabytes)
    Converts the specified double value from gigabytes to megabytes
    static double
    megabytesToBytes(double megabytes)
    Converts the specified double value from megabytes to bytes
    static double
    megabytesToGigabytes(double megabytes)
    Converts the specified double value from megabytes to gigabytes

    Methods inherited from class java.lang.Object

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

    • Convert

      public Convert()
  • Method Details

    • 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