Companion

object Companion

Contains static declarations for the Zero type.

Functions

Link copied to clipboard
@ExperimentalSince(version = KotoolsTypesVersion.V4_5_3)
fun orNull(number: Byte): Zero?
@ExperimentalSince(version = KotoolsTypesVersion.V5_0_0)
fun orNull(number: Double): Zero?
@ExperimentalSince(version = KotoolsTypesVersion.V5_0_0)
fun orNull(number: Float): Zero?
@ExperimentalSince(version = KotoolsTypesVersion.V5_0_0)
fun orNull(number: Int): Zero?
@ExperimentalSince(version = KotoolsTypesVersion.V5_0_0)
fun orNull(number: Long): Zero?
@ExperimentalSince(version = KotoolsTypesVersion.V5_0_0)
fun orNull(number: Short): Zero?

Creates an instance of Zero from the specified number, or returns null if the number is other than zero.

@ExperimentalSince(version = KotoolsTypesVersion.V5_0_0)
fun orNull(text: String): Zero?

Creates an instance of Zero from the specified text, or returns null if the text is an invalid representation of zero.

Link copied to clipboard
@ExperimentalSince(version = KotoolsTypesVersion.V4_5_3)
fun orThrow(number: Byte): Zero
@ExperimentalSince(version = KotoolsTypesVersion.V5_0_0)
fun orThrow(number: Double): Zero
@ExperimentalSince(version = KotoolsTypesVersion.V5_0_0)
fun orThrow(number: Float): Zero
@ExperimentalSince(version = KotoolsTypesVersion.V5_0_0)
fun orThrow(number: Int): Zero
@ExperimentalSince(version = KotoolsTypesVersion.V5_0_0)
fun orThrow(number: Long): Zero
@ExperimentalSince(version = KotoolsTypesVersion.V5_0_0)
fun orThrow(number: Short): Zero

Creates an instance of Zero from the specified number, or throws an IllegalArgumentException if the number is other than zero.

@ExperimentalSince(version = KotoolsTypesVersion.V5_0_0)
fun orThrow(text: String): Zero

Creates an instance of Zero from the specified text, or throws an IllegalArgumentException if the text is an invalid representation of zero.