- java.lang.Object
-
- com.github.mizosoft.methanol.internal.function.Unchecked
-
public class Unchecked extends java.lang.ObjectStatic functions that make it easier to mix checked exceptions with lambdas.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.util.function.Consumer<T>consumer(ThrowingConsumer<T> consumer)static <T,R>
java.util.function.Function<T,R>func(ThrowingFunction<T,R> func)static voidpropagateIfUnchecked(java.lang.Throwable t)static java.util.concurrent.CompletableFuture<java.lang.Void>runAsync(ThrowingRunnable runnable, java.util.concurrent.Executor executor)static java.lang.Runnablerunnable(ThrowingRunnable runnable)static <T> java.util.function.Supplier<T>supplier(ThrowingSupplier<T> supplier)static <T> java.util.concurrent.CompletableFuture<T>supplyAsync(ThrowingSupplier<T> supplier, java.util.concurrent.Executor executor)
-
-
-
Method Detail
-
func
public static <T,R> java.util.function.Function<T,R> func(ThrowingFunction<T,R> func)
-
consumer
public static <T> java.util.function.Consumer<T> consumer(ThrowingConsumer<T> consumer)
-
supplier
public static <T> java.util.function.Supplier<T> supplier(ThrowingSupplier<T> supplier)
-
runnable
public static java.lang.Runnable runnable(ThrowingRunnable runnable)
-
supplyAsync
public static <T> java.util.concurrent.CompletableFuture<T> supplyAsync(ThrowingSupplier<T> supplier, java.util.concurrent.Executor executor)
-
runAsync
public static java.util.concurrent.CompletableFuture<java.lang.Void> runAsync(ThrowingRunnable runnable, java.util.concurrent.Executor executor)
-
propagateIfUnchecked
public static void propagateIfUnchecked(java.lang.Throwable t)
-
-