Class NumVal.Helper

java.lang.Object
org.kink_lang.kink.NumVal.Helper
Enclosing class:
NumVal

public static class NumVal.Helper extends Object
The helper for num vals.
See Also:
  • Method Details

    • of

      public NumVal of(int intNum)
      Returns a num value representing the specified number.
      Parameters:
      intNum - an int number.
      Returns:
      a num val representing the specified number.
    • of

      public NumVal of(long longNum)
      Returns a num value representing the specified number.
      Parameters:
      longNum - a long number.
      Returns:
      a num val representing the specified number.
    • of

      public NumVal of(long mantissa, int scale)
      Returns a num value (Mantissa=mantissa, Scale=scale).
      Parameters:
      mantissa - Mantissa attribute.
      scale - Scale attribute.
      Returns:
      a num value (Mantissa=mantissa, Scale=scale).
      Throws:
      IllegalArgumentException - for overflow.
    • of

      public NumVal of(BigInteger bigInt)
      Returns a num value representing the specified number.
      Parameters:
      bigInt - a BigInteger number.
      Returns:
      a num val representing the specified number.
      Throws:
      IllegalArgumentException - for overflow.
    • of

      public NumVal of(BigDecimal bigDecimal)
      Returns a num value representing the specified number.
      Parameters:
      bigDecimal - a BigDecimal number.
      Returns:
      a num val representing the specified number.
      Throws:
      IllegalArgumentException - for overflow.