Package jromp

Class Utils.NumberUtils

java.lang.Object
jromp.Utils.NumberUtils
Enclosing class:
Utils

public static class Utils.NumberUtils extends Object
Utility class for number conversions.
  • Method Details

    • getT

      public static <T extends Number> T getT(T value, double num)
      Returns the value of the number received, converted to the type of the reduction operation.
      Type Parameters:
      T - the type of the value.
      Parameters:
      value - the value used to determine the type of the conversion.
      num - the number to be converted to the desired type.
      Returns:
      the converted value with type T.
      Throws:
      IllegalArgumentException - if the type is not supported.