toString

override fun toString(): String

Returns the string representation of this floating-point number.


Calling from Kotlin

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

val number = -23
val actual: String = StrictlyNegativeDouble.create(number)
.toString()
val expected: String = number.toDouble()
.toString()
assertEquals(expected, actual)

Calling from Java

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

final Number number = -23.0;
final String actual = StrictlyNegativeDouble.Companion.create(number)
.toString();
final String expected = number.toString();
Assertions.assertEquals(expected, actual);