compareTo
Compares this number with the other one for order. Returns zero if this number equals the other one, a negative number if it's less than the other one, or a positive number if it's greater than the other one.
Calling from Kotlin
Here's an example of calling this method from Kotlin code:
val zero = Zero()
val other: Byte = 1
val actual: Boolean = zero < other // or zero.compareTo(other) < 0
assertTrue(actual)
Calling from Java
Here's an example of calling this method from Java code:
final Zero zero = new Zero();
final byte other = 1;
final boolean actual = zero.compareTo(other) < 0;
Assertions.assertTrue(actual);
Compares this number with the other one for order. Returns zero if this number equals the other one, a negative number if it's less than the other one, or a positive number if it's greater than the other one.
Calling from Kotlin
Here's an example of calling this method from Kotlin code:
val zero = Zero()
val other: Short = 1
val actual: Boolean = zero < other // or zero.compareTo(other) < 0
assertTrue(actual)
Calling from Java
Here's an example of calling this method from Java code:
final Zero zero = new Zero();
final short other = 1;
final boolean actual = zero.compareTo(other) < 0;
Assertions.assertTrue(actual);
Compares this number with the other one for order. Returns zero if this number equals the other one, a negative number if it's less than the other one, or a positive number if it's greater than the other one.
Calling from Kotlin
Here's an example of calling this method from Kotlin code:
val zero = Zero()
val other = 1
val actual: Boolean = zero < other // or zero.compareTo(other) < 0
assertTrue(actual)
Calling from Java
Here's an example of calling this method from Java code:
final Zero zero = new Zero();
final int other = 1;
final boolean actual = zero.compareTo(other) < 0;
Assertions.assertTrue(actual);
Compares this number with the other one for order. Returns zero if this number equals the other one, a negative number if it's less than the other one, or a positive number if it's greater than the other one.
Calling from Kotlin
Here's an example of calling this method from Kotlin code:
val zero = Zero()
val other: Long = 1
val actual: Boolean = zero < other // or zero.compareTo(other) < 0
assertTrue(actual)
Calling from Java
Here's an example of calling this method from Java code:
final Zero zero = new Zero();
final long other = 1;
final boolean actual = zero.compareTo(other) < 0;
Assertions.assertTrue(actual);
Compares this number with the other one for order. Returns zero if this number equals the other one, a negative number if it's less than the other one, or a positive number if it's greater than the other one.
Calling from Kotlin
Here's an example of calling this method from Kotlin code:
val zero = Zero()
val other = 0.01f
val actual: Boolean = zero < other // or zero.compareTo(other) < 0
assertTrue(actual)
Calling from Java
Here's an example of calling this method from Java code:
final Zero zero = new Zero();
final float other = 0.01f;
final boolean actual = zero.compareTo(other) < 0;
Assertions.assertTrue(actual);
Compares this number with the other one for order. Returns zero if this number equals the other one, a negative number if it's less than the other one, or a positive number if it's greater than the other one.
Calling from Kotlin
Here's an example of calling this method from Kotlin code:
val zero = Zero()
val other = 0.01
val actual: Boolean = zero < other // or zero.compareTo(other) < 0
assertTrue(actual)
Calling from Java
Here's an example of calling this method from Java code:
final Zero zero = new Zero();
final double other = 0.01;
final boolean actual = zero.compareTo(other) < 0;
Assertions.assertTrue(actual);