check

inline fun check(value: Boolean)(source)

Throws an IllegalStateException if the value is false.

Since Kotlin

1.0

Samples


inline fun check(value: Boolean, lazyMessage: () -> Any)(source)

Throws an IllegalStateException with the result of calling lazyMessage if the value is false.

Since Kotlin

1.0

Samples