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 = BigDecimal

Constructors

Link copied to clipboard
fun BigDecimal()
Link copied to clipboard
actual fun BigDecimal(strVal: String)
expect fun BigDecimal(strVal: String)
actual fun BigDecimal(strVal: String)
Link copied to clipboard
actual fun BigDecimal(doubleVal: Double)
expect fun BigDecimal(doubleVal: Double)
actual fun BigDecimal(doubleVal: Double)
Link copied to clipboard
actual fun BigDecimal(intVal: Int)
expect fun BigDecimal(intVal: Int)
actual fun BigDecimal(intVal: Int)
Link copied to clipboard
actual fun BigDecimal(longVal: Long)
expect fun BigDecimal(longVal: Long)
actual fun BigDecimal(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
Link copied to clipboard
actual fun divide(divisor: BigDecimal): BigDecimal
expect 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
Link copied to clipboard
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
Link copied to clipboard
actual fun negate(): BigDecimal
expect fun negate(): BigDecimal
actual fun negate(): BigDecimal
Link copied to clipboard
actual fun signum(): Int
expect 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
Link copied to clipboard
open override fun toByte(): Byte
fun toByte(): Byte
Link copied to clipboard
open override fun toChar(): Char
fun toChar(): Char
Link copied to clipboard
open override fun toDouble(): Double
fun toDouble(): Double
Link copied to clipboard
open override fun toFloat(): Float
fun toFloat(): Float
Link copied to clipboard
open override fun toInt(): Int
fun toInt(): Int
Link copied to clipboard
open override fun toLong(): Long
fun toLong(): Long
Link copied to clipboard
open override fun toShort(): Short
fun toShort(): Short
Link copied to clipboard
open override fun toString(): String
open override fun toString(): String

Extensions

Link copied to clipboard
actual fun BigDecimal.toNumber(): Number
expect fun BigDecimal.toNumber(): Number
actual fun BigDecimal.toNumber(): Number