From fba3c68ef2e44a101b9915c07b18cfe14f084aa2 Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 31 Aug 2020 14:21:10 +0200 Subject: [PATCH] Added hashCode() implementation to equal equals() --- .../kotlin/net/dankito/utils/multiplatform/BigDecimal.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/BigDecimal.kt b/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/BigDecimal.kt index 3f192155..f4b167fb 100644 --- a/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/BigDecimal.kt +++ b/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/BigDecimal.kt @@ -53,6 +53,10 @@ actual class BigDecimal(val decimal: NSDecimalNumber) : Comparable { return super.equals(other) } + override fun hashCode(): Int { + return decimal.hashCode() + } + override fun toString(): String { return decimal.description ?: decimal.descriptionWithLocale(NSLocale.currentLocale)