This function accepts a nullable argument, and, if it is null, throws an IllegalStateException. Otherwise, it returns the same argument as a non-nullable type:
val strNoNull: String = checkNotNull(str)
{ "str argument can not be null" }
This function accepts a nullable argument, and, if it is null, throws an IllegalStateException. Otherwise, it returns the same argument as a non-nullable type:
val strNoNull: String = checkNotNull(str)
{ "str argument can not be null" }
3.145.12.3