checkArgumentNonnegative

@IntRange(from = 0)
open fun checkArgumentNonnegative(value: Int, @Nullable errorMessage: @Nullable String): Int

Ensures that that the argument numeric value is non-negative.

Return

the validated numeric value

Parameters

value

a numeric int value

errorMessage

the exception message to use if the check fails

Throws


@IntRange(from = 0)
open fun checkArgumentNonnegative(value: Int): Int

Ensures that that the argument numeric value is non-negative.

Return

the validated numeric value

Parameters

value

a numeric int value

Throws