Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.

Hierarchy

  • BigDecimalWrapper

Constructors

Methods

  • Returns the wrapped value as a number.

    Returns number

    The java.math.BigDecimal value converted to a JS Number.

  • Compares this wrapper to another object.

    Parameters

    • o: object

      The object to compare.

    Returns boolean

    true if o is a BigDecimalWrapper with an equal wrapped value.

  • Returns a hash code based on the wrapped value.

    Returns number

  • Returns the string representation of the wrapped java.math.BigDecimal.

    Returns string

  • Returns the string representation of this value.

    Provided to match JavaScript's `valueOf` convention.

    Returns string

    The string form of this value.

  • Creates a wrapper from a decimal string. Strings may optionally start with +/-, must have a decimal value, and may end with e/E followed by an exponent.

    Parameters

    • value: string

      A string representation of a decimal number.

    Returns BigDecimalWrapper

    A wrapper for the parsed value.