require

inline fun require(value: Boolean)(source)

Throws an IllegalArgumentException if the value is false.

Since Kotlin

1.0

Samples


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

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

Since Kotlin

1.0

Samples