
no.nav.common.utils.fn.UnsafeSupplier Maven / Gradle / Ivy
package no.nav.common.utils.fn;
import lombok.SneakyThrows;
import java.util.function.Supplier;
@FunctionalInterface
public interface UnsafeSupplier extends Supplier {
@Override
@SneakyThrows
default T get() {
return unsafeGet();
}
T unsafeGet() throws Throwable;
static UnsafeSupplier toVoid(UnsafeRunnable unsafeRunnable) {
return ()->{
unsafeRunnable.run();
return null;
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy