Class NumVal

  • All Implemented Interfaces:

    public class NumVal
    extends Val
    A num val.

    A num val consists of two integers: mantissa and scale. The num val represents an decimal number (mantissa * 10**(-scale)). Kink runtimes must support arbitrary range for mantissa as far as the memory is not exhausted, and at least the range [-32767, +32767] for scale.

    In this implementation, a num val is backed by a Java BigDecimal. The mantissa is the “unscaled value” of BigDecimal, and the scale is the “scale” of BigDecimal.

    • Method Detail

      • getBigDecimal

        public BigDecimal getBigDecimal()
        Returns the big decimal number.
        the big decimal number.
      • getCustomVarMapping

        public VarMapping getCustomVarMapping()
        Description copied from class: Val
        Returns the var mapping for a val class.

        Override this method to provide vars common to the val class. The content of the var mapping is preferred than the common ones.

        getCustomVarMapping in class Val
        the var mapping for a val class.
      • hashCode

        public int hashCode()
        hashCode in class Object