We want to add experimental overloads for the Zero.Companion.orNull and the Zero.Companion.orThrow methods, for creating an instance of the Zero type from the specified Int number.
Here's the Application Programming Interface (API) goal of this issue:
interface Zero {
companion object {
fun orNull(number: Int): Zero?
fun orThrow(number: Int): Zero
}
}
These factory methods should be available for all platforms, except for the orNull method that shouldn't be accessible from Java, due to its non-explicit support for nullable types.
📝 Description
We want to add experimental overloads for the
Zero.Companion.orNull
and theZero.Companion.orThrow
methods, for creating an instance of theZero
type from the specifiedInt
number.Here's the Application Programming Interface (API) goal of this issue:
These factory methods should be available for all platforms, except for the
orNull
method that shouldn't be accessible from Java, due to its non-explicit support for nullable types.✅ Checklist
orThrow(Int)
method for Kotlin and Java with tests, documentation and samples.orNull(Int)
method only for Kotlin with tests, documentation and samples.