Class NumberUtils

java.lang.Object
host.anzo.commons.utils.NumberUtils

public class NumberUtils extends Object
Since:
9/8/2021
  • Constructor Details

    • NumberUtils

      public NumberUtils()
  • Method Details

    • toMetricPrefixedString

      @NotNull public static @NotNull String toMetricPrefixedString(long number)
      Parameters:
      number - number to convert
      Returns:
      number string in metric prefix format.
    • packIntsToLong

      public static long packIntsToLong(int int1, int int2)
      Pack to integers to long
      Parameters:
      int1 - first int
      int2 - second int
      Returns:
      long number with two specified packed integers
    • unpackIntsFromLong

      public static org.apache.commons.lang3.tuple.Pair<Integer,Integer> unpackIntsFromLong(long packedValue)
      Unpack two integers from specified long number
      Parameters:
      packedValue - long number
      Returns:
      pair of two unpacked integers