times

operator fun times(other: Integer): Integer

Multiplies this integer by the other one.


Calling from Kotlin

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

// Given
val x: Integer = Integer.from(9223372036854775807)
val y: Integer = Integer.from(10)
// When
val result: Integer = x * y
// Then
val expected: Integer = Integer.fromDecimal("92233720368547758070")
check(result == expected)

Calling from Java

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

// Given
final Integer x = Integer.from(9223372036854775807L);
final Integer y = Integer.from(10);
// When
final Integer result = x.times(y);
// Then
final Integer expected = Integer.fromDecimal("92233720368547758070");
final boolean check = result.equals(expected);
if (!check) throw new IllegalStateException("Check failed.");