Module methanol

Class Unchecked


  • public class Unchecked
    extends java.lang.Object
    Static functions that make it easier to mix checked exceptions with lambdas.
    • 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)