Skip to content

Commit df08715

Browse files
Automated commit of generated code
1 parent 3c577f4 commit df08715

File tree

1 file changed

+0
-20
lines changed
  • core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl

1 file changed

+0
-20
lines changed

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/Utils.kt

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import org.jetbrains.kotlinx.dataframe.impl.columns.resolve
1313
import org.jetbrains.kotlinx.dataframe.impl.columns.toColumnSet
1414
import org.jetbrains.kotlinx.dataframe.nrow
1515
import java.math.BigDecimal
16-
import java.math.BigInteger
1716
import kotlin.reflect.KCallable
1817
import kotlin.reflect.KClass
1918
import kotlin.reflect.KFunction
@@ -121,25 +120,6 @@ internal fun <T> Iterable<T>.anyNull(): Boolean = any { it == null }
121120
@PublishedApi
122121
internal fun emptyPath(): ColumnPath = ColumnPath(emptyList())
123122

124-
@PublishedApi
125-
internal fun <T : Number> KClass<T>.zeroOrNull(): T? =
126-
when (this) {
127-
Int::class -> 0 as T
128-
Byte::class -> 0.toByte() as T
129-
Short::class -> 0.toShort() as T
130-
Long::class -> 0.toLong() as T
131-
Double::class -> 0.toDouble() as T
132-
Float::class -> 0.toFloat() as T
133-
BigDecimal::class -> BigDecimal.ZERO as T
134-
BigInteger::class -> BigInteger.ZERO as T
135-
Number::class -> 0 as? T
136-
else -> null
137-
}
138-
139-
@PublishedApi
140-
internal fun <T : Number> KClass<T>.zero(): T =
141-
zeroOrNull() ?: throw NotImplementedError("Zero value for $this is not supported")
142-
143123
internal fun <T> catchSilent(body: () -> T): T? =
144124
try {
145125
body()

0 commit comments

Comments
 (0)