toShort

@ExperimentalSince(version = KotoolsTypesVersion.V4_5_2)
fun toShort(): Short

Returns this number as Short.


Calling from Kotlin

Here's an example of calling this method from Kotlin code:

val actual: Short = Zero()
.toShort()
val expected: Short = 0
assertEquals(expected, actual)

Calling from Java

Here's an example of calling this method from Java code:

final short actual = new Zero()
.toShort();
final short expected = 0;
Assertions.assertEquals(expected, actual);