toString
Returns the string representation of this floating-point number.
Calling from Kotlin
Here's an example of calling this method from Kotlin code:
val number = -23
val actual: String = StrictlyNegativeDouble.create(number)
.toString()
val expected: String = number.toDouble()
.toString()
assertEquals(expected, actual)
Content copied to clipboard
Calling from Java
Here's an example of calling this method 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);
Content copied to clipboard