io.github.serpro69.kfaker.FunctionalUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-faker Show documentation
Show all versions of kotlin-faker Show documentation
https://github.com/serpro69/kotlin-faker
package io.github.serpro69.kfaker;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import java.util.function.Consumer;
public class FunctionalUtil {
public static Function1 fromConsumer(Consumer callable) {
return t -> {
callable.accept(t);
return Unit.INSTANCE;
};
}
}