Package-level declarations

Functions

Link copied to clipboard
fun <T : Any> isNotNull(value: T?): Boolean

Wraps the kotlin.checkNotNull to avoid IllegalStateExceptions. Just returns false instead of the Exception like it is implemented in the native kotlin implementation.

Link copied to clipboard
inline fun multiCatch(runThis: () -> Unit, catchBlock: (Throwable) -> Unit, vararg exceptions: KClass<out Throwable>)

Take multiple Exceptions to catch and call the catchBlock if it gets thrown. If the thrown Exception is not in the list it will be just forwarded.

Link copied to clipboard
inline fun <T1, T2, R> multiLet(value1: T1?, value2: T2?, block: (T1, T2) -> R?): R?

kotlin.let similar function with two parameter support.

inline fun <T1, T2, T3, R> multiLet(value1: T1?, value2: T2?, value3: T3?, block: (T1, T2, T3) -> R?): R?

kotlin.let similar function with three parameter support.