incrementExact

open fun incrementExact(a: Int): Int

Returns the argument incremented by one, throwing an exception if the result overflows an int. The overflow only occurs for the maximum value.

Return

the result

Parameters

a

the value to increment

Throws

if the result overflows an int


open fun incrementExact(a: Long): Long

Returns the argument incremented by one, throwing an exception if the result overflows a long. The overflow only occurs for the maximum value.

Return

the result

Parameters

a

the value to increment

Throws

if the result overflows a long