diff --git a/core/api/core.api b/core/api/core.api index df2c21454b..7eae4a7a15 100644 --- a/core/api/core.api +++ b/core/api/core.api @@ -5711,8 +5711,6 @@ public final class org/jetbrains/kotlinx/dataframe/impl/UtilsKt { public static final fun headPlusArray (Z[Z)[Z public static final fun toCamelCaseByDelimiters (Ljava/lang/String;Lkotlin/text/Regex;Ljava/lang/String;)Ljava/lang/String; public static synthetic fun toCamelCaseByDelimiters$default (Ljava/lang/String;Lkotlin/text/Regex;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String; - public static final fun zero (Lkotlin/reflect/KClass;)Ljava/lang/Number; - public static final fun zeroOrNull (Lkotlin/reflect/KClass;)Ljava/lang/Number; } public final class org/jetbrains/kotlinx/dataframe/impl/aggregation/AggregatableInternalKt { diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/Utils.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/Utils.kt index bbe4f92c67..433a59e432 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/Utils.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/Utils.kt @@ -13,7 +13,6 @@ import org.jetbrains.kotlinx.dataframe.impl.columns.resolve import org.jetbrains.kotlinx.dataframe.impl.columns.toColumnSet import org.jetbrains.kotlinx.dataframe.nrow import java.math.BigDecimal -import java.math.BigInteger import kotlin.reflect.KCallable import kotlin.reflect.KClass import kotlin.reflect.KFunction @@ -121,25 +120,6 @@ internal fun Iterable.anyNull(): Boolean = any { it == null } @PublishedApi internal fun emptyPath(): ColumnPath = ColumnPath(emptyList()) -@PublishedApi -internal fun KClass.zeroOrNull(): T? = - when (this) { - Int::class -> 0 as T - Byte::class -> 0.toByte() as T - Short::class -> 0.toShort() as T - Long::class -> 0.toLong() as T - Double::class -> 0.toDouble() as T - Float::class -> 0.toFloat() as T - BigDecimal::class -> BigDecimal.ZERO as T - BigInteger::class -> BigInteger.ZERO as T - Number::class -> 0 as? T - else -> null - } - -@PublishedApi -internal fun KClass.zero(): T = - zeroOrNull() ?: throw NotImplementedError("Zero value for $this is not supported") - internal fun catchSilent(body: () -> T): T? = try { body()