assertNotNull

fun <T : Any> assertNotNull(actual: T?, message: String? = null): T(source)

Asserts that the actual value is not null, with an optional message.

Since Kotlin

1.0

@JvmName(name = "assertNotNullInline")
inline fun <T : Any, R> assertNotNull(actual: T?, message: String? = null, block: (T) -> R)(source)

Asserts that the actual value is not null, with an optional message and a function block to process the not-null value.

Since Kotlin

1.0