Package com.jeovanimartinez.androidutils.extensions.nullability

Functions

Link copied to clipboard
fun <T : Any> T?.whenNotNull(f: (it: T) -> Unit)

Execute the code block only if the variable is not null. Inside the function, always use it to refer to the value of the variable.