Fixes constructor issue in this BigDecimal Implementation

This commit is contained in:
Vitor Pamplona
2026-03-28 11:31:14 -04:00
parent c11e41529e
commit eaa45aee05
@@ -20,10 +20,10 @@
*/
package com.vitorpamplona.quartz.utils
actual class BigDecimal internal constructor(
private val value: String,
actual class BigDecimal actual constructor(
strVal: String,
) : Number() {
actual constructor(strVal: String) : this(strVal.trim())
private val value: String = strVal.trim()
actual constructor(doubleVal: Double) : this(doubleVal.toBigDecimalString())
@@ -62,7 +62,7 @@ actual class BigDecimal internal constructor(
override fun toFloat(): Float = value.toFloat()
override fun equals(other: Any?): Boolean = (this === other) || value == (other as? BigDecimal)?.value
override fun equals(other: Any?): Boolean = (this === other) || (other is BigDecimal && value == other.value)
override fun hashCode(): Int = value.hashCode()