notNullAnd

inline fun <T> T?.notNullAnd(body: T.() -> Boolean): Boolean

If the receiver is null, answer false. Otherwise run the body with the non-null receiver and answer the resulting Boolean.

Receiver

Either null or a value to use as the receiver of the provided function.

Author

Mark van Gulik

Parameters

body

true iff the receiver is non-null and the body yields true for it.