suspendFunction

fun <T, R> suspendFunction(isRunWithInterruptible: Boolean = true, function: Function<T, R>): suspend (T) -> R

Kotlin api:

fun foo(block: suspend (T) -> R) {  }
fun bar(block: suspend T.() -> R) { }

Use it in Java:

foo(Lambdas.suspendFunction(t -> new R()));
bar(Lambdas.suspendFunction(t -> new R()));

fun <T1, T2, R> suspendFunction(isRunWithInterruptible: Boolean = true, function: BiFunction<T1, T2, R>): suspend (T1, T2) -> R
fun <T1, T2, T3, R> suspendFunction(isRunWithInterruptible: Boolean = true, function: (T1, T2, T3) -> R): suspend (T1, T2, T3) -> R
fun <T1, T2, T3, T4, R> suspendFunction(isRunWithInterruptible: Boolean = true, function: (T1, T2, T3, T4) -> R): suspend (T1, T2, T3, T4) -> R
fun <T1, T2, T3, T4, T5, R> suspendFunction(isRunWithInterruptible: Boolean = true, function: (T1, T2, T3, T4, T5) -> R): suspend (T1, T2, T3, T4, T5) -> R