Class NumHelper

java.lang.Object
org.kink_lang.kink.NumHelper

public class NumHelper extends Object
The helper for num vals.
  • Method Details

    • of

      public NumVal of(BigDecimal bigDecimal)
      Returns a num val representing the specified number.
      Parameters:
      bigDecimal - a BigDecimal number.
      Returns:
      a num val representing the specified number.
      Throws:
      IllegalArgumentException - when the scale is negative.
    • of

      public NumVal of(int intNum)
      Returns a num val 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 val representing the specified number.
      Parameters:
      longNum - a long number.
      Returns:
      a num val representing the specified number.
    • of

      public NumVal of(BigInteger bigInt)
      Returns a num val representing the specified number.
      Parameters:
      bigInt - a BigInteger number.
      Returns:
      a num val representing the specified number.