public final class LambdaExceptionUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
LambdaExceptionUtil.BiConsumer_WithExceptions<T,U,E extends java.lang.Exception> |
static interface |
LambdaExceptionUtil.Consumer_WithExceptions<T,E extends java.lang.Exception> |
static interface |
LambdaExceptionUtil.Function_WithExceptions<T,R,E extends java.lang.Exception> |
static interface |
LambdaExceptionUtil.IntConsumer_WithExceptions<E extends java.lang.Exception> |
static interface |
LambdaExceptionUtil.IntPredicate_WithExceptions<E extends java.lang.Exception> |
static interface |
LambdaExceptionUtil.IntUnaryOperator_WithExceptions<E extends java.lang.Exception> |
static interface |
LambdaExceptionUtil.Predicate_WithExceptions<T,E extends java.lang.Exception> |
static interface |
LambdaExceptionUtil.Runnable_WithExceptions<E extends java.lang.Exception> |
static interface |
LambdaExceptionUtil.Supplier_WithExceptions<T,E extends java.lang.Exception> |
Constructor and Description |
---|
LambdaExceptionUtil() |
Modifier and Type | Method and Description |
---|---|
static <T,U,E extends java.lang.Exception> |
rethrowBiConsumer(LambdaExceptionUtil.BiConsumer_WithExceptions<T,U,E> biConsumer) |
static <T,E extends java.lang.Exception> |
rethrowConsumer(LambdaExceptionUtil.Consumer_WithExceptions<T,E> consumer)
.forEach(rethrowConsumer(name -
>System.out.println(Class.forName(name)))); or
.forEach(rethrowConsumer(ClassNameUtil::println));
|
static <T,R,E extends java.lang.Exception> |
rethrowFunction(LambdaExceptionUtil.Function_WithExceptions<T,R,E> function)
.map(rethrowFunction(name - > Class.forName(name))) or
.map(rethrowFunction(Class::forName))
|
static <E extends java.lang.Exception> |
rethrowIntConsumer(LambdaExceptionUtil.IntConsumer_WithExceptions<E> consumer) |
static <T,E extends java.lang.Exception> |
rethrowIntPredicate(LambdaExceptionUtil.IntPredicate_WithExceptions<E> predicate) |
static <E extends java.lang.Exception> |
rethrowIntUnaryOperator(LambdaExceptionUtil.IntUnaryOperator_WithExceptions<E> consumer) |
static <T,E extends java.lang.Exception> |
rethrowPredicate(LambdaExceptionUtil.Predicate_WithExceptions<T,E> predicate) |
static <T,E extends java.lang.Exception> |
rethrowSupplier(LambdaExceptionUtil.Supplier_WithExceptions<T,E> function)
rethrowSupplier(() -> new StringJoiner(new String(new byte[]{77, 97, 114,
107}, "UTF-8"))),
|
static <T,R,E extends java.lang.Exception> |
uncheck(LambdaExceptionUtil.Function_WithExceptions<T,R,E> function,
T t)
uncheck(Class::forName, "xxx");
|
static void |
uncheck(LambdaExceptionUtil.Runnable_WithExceptions t)
uncheck(() -> Class.forName("xxx"));
|
static <R,E extends java.lang.Exception> |
uncheck(LambdaExceptionUtil.Supplier_WithExceptions<R,E> supplier)
uncheck(() -> Class.forName("xxx"));
|
public static <T,E extends java.lang.Exception> java.util.function.Consumer<T> rethrowConsumer(LambdaExceptionUtil.Consumer_WithExceptions<T,E> consumer) throws E extends java.lang.Exception
E extends java.lang.Exception
public static <E extends java.lang.Exception> java.util.function.IntConsumer rethrowIntConsumer(LambdaExceptionUtil.IntConsumer_WithExceptions<E> consumer) throws E extends java.lang.Exception
E extends java.lang.Exception
public static <T,U,E extends java.lang.Exception> java.util.function.BiConsumer<T,U> rethrowBiConsumer(LambdaExceptionUtil.BiConsumer_WithExceptions<T,U,E> biConsumer) throws E extends java.lang.Exception
E extends java.lang.Exception
public static <T,R,E extends java.lang.Exception> java.util.function.Function<T,R> rethrowFunction(LambdaExceptionUtil.Function_WithExceptions<T,R,E> function) throws E extends java.lang.Exception
E extends java.lang.Exception
public static <T,E extends java.lang.Exception> java.util.function.Predicate<T> rethrowPredicate(LambdaExceptionUtil.Predicate_WithExceptions<T,E> predicate) throws E extends java.lang.Exception
E extends java.lang.Exception
public static <T,E extends java.lang.Exception> java.util.function.IntPredicate rethrowIntPredicate(LambdaExceptionUtil.IntPredicate_WithExceptions<E> predicate) throws E extends java.lang.Exception
E extends java.lang.Exception
public static <E extends java.lang.Exception> java.util.function.IntUnaryOperator rethrowIntUnaryOperator(LambdaExceptionUtil.IntUnaryOperator_WithExceptions<E> consumer) throws E extends java.lang.Exception
E extends java.lang.Exception
public static <T,E extends java.lang.Exception> java.util.function.Supplier<T> rethrowSupplier(LambdaExceptionUtil.Supplier_WithExceptions<T,E> function) throws E extends java.lang.Exception
E extends java.lang.Exception
public static void uncheck(LambdaExceptionUtil.Runnable_WithExceptions t)
public static <R,E extends java.lang.Exception> R uncheck(LambdaExceptionUtil.Supplier_WithExceptions<R,E> supplier)
public static <T,R,E extends java.lang.Exception> R uncheck(LambdaExceptionUtil.Function_WithExceptions<T,R,E> function, T t)