August 2018
Beginner
178 pages
4h 56m
English
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" }
Read now
Unlock full access