File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import org.jetbrains.kotlinx.dataframe.impl.columns.resolve
1313import org.jetbrains.kotlinx.dataframe.impl.columns.toColumnSet
1414import org.jetbrains.kotlinx.dataframe.nrow
1515import java.math.BigDecimal
16- import java.math.BigInteger
1716import kotlin.reflect.KCallable
1817import kotlin.reflect.KClass
1918import kotlin.reflect.KFunction
@@ -121,25 +120,6 @@ internal fun <T> Iterable<T>.anyNull(): Boolean = any { it == null }
121120@PublishedApi
122121internal 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-
143123internal fun <T > catchSilent (body : () -> T ): T ? =
144124 try {
145125 body()
You can’t perform that action at this time.
0 commit comments