BigDecimal

actual class BigDecimal : Number
expect class BigDecimal

A multiplatform BigDecimal

It's here for historical reasons mainly as GraphQL doesn't has Big Decimal types and should be moved to a separate module

BigDecimal cannot subclass Number in JS, as it will cause runtime trap in any compiled Kotlin/JS product in the module initialization script.

actual class BigDecimal
actual typealias BigDecimal = java.math.BigDecimal
actual class BigDecimal

Constructors

Link copied to clipboard
actual constructor(strVal: String)
actual constructor(doubleVal: Double)
actual constructor(intVal: Int)
actual constructor(longVal: Long)
expect constructor(strVal: String)
expect constructor(doubleVal: Double)
expect constructor(intVal: Int)
expect constructor(longVal: Long)
constructor()
actual constructor(strVal: String)
actual constructor(doubleVal: Double)
actual constructor(intVal: Int)
actual constructor(longVal: Long)
constructor()
actual constructor(strVal: String)
actual constructor(doubleVal: Double)
actual constructor(intVal: Int)
actual constructor(longVal: Long)

Functions

Link copied to clipboard
actual fun add(augend: BigDecimal): BigDecimal
expect fun add(augend: BigDecimal): BigDecimal
actual fun add(augend: BigDecimal): BigDecimal
actual fun add(augend: BigDecimal): BigDecimal
Link copied to clipboard
actual fun divide(divisor: BigDecimal): BigDecimal
expect fun divide(divisor: BigDecimal): BigDecimal
actual fun divide(divisor: BigDecimal): BigDecimal
actual fun divide(divisor: BigDecimal): BigDecimal
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
open override fun hashCode(): Int
open override fun hashCode(): Int
Link copied to clipboard
actual fun multiply(multiplicand: BigDecimal): BigDecimal
expect fun multiply(multiplicand: BigDecimal): BigDecimal
actual fun multiply(multiplicand: BigDecimal): BigDecimal
actual fun multiply(multiplicand: BigDecimal): BigDecimal
Link copied to clipboard
actual fun negate(): BigDecimal
expect fun negate(): BigDecimal
actual fun negate(): BigDecimal
actual fun negate(): BigDecimal
Link copied to clipboard
actual fun signum(): Int
expect fun signum(): Int
actual fun signum(): Int
actual fun signum(): Int
Link copied to clipboard
actual fun subtract(subtrahend: BigDecimal): BigDecimal
expect fun subtract(subtrahend: BigDecimal): BigDecimal
actual fun subtract(subtrahend: BigDecimal): BigDecimal
actual fun subtract(subtrahend: BigDecimal): BigDecimal
Link copied to clipboard
open override fun toByte(): Byte
fun toByte(): Byte
fun toByte(): Byte
Link copied to clipboard
open fun toChar(): Char
fun toChar(): Char
fun toChar(): Char
Link copied to clipboard
open override fun toDouble(): Double
Link copied to clipboard
open override fun toFloat(): Float
fun toFloat(): Float
fun toFloat(): Float
Link copied to clipboard
open override fun toInt(): Int
fun toInt(): Int
fun toInt(): Int
Link copied to clipboard
open override fun toLong(): Long
fun toLong(): Long
fun toLong(): Long
Link copied to clipboard
actual fun BigDecimal.toNumber(): Number
expect fun BigDecimal.toNumber(): Number
actual fun BigDecimal.toNumber(): Number
actual fun BigDecimal.toNumber(): Number
Link copied to clipboard
open override fun toShort(): Short
fun toShort(): Short
fun toShort(): Short
Link copied to clipboard
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String