public final class Sneaky
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T,U> java.util.function.BiConsumer<T,U> |
biConsumer(CheckedBiConsumer<T,U> checkedBiConsumer)
Returns BiConsumer that may throw Exception ignoring
throws
Exception clause in the method signature. |
static <T,U,R> java.util.function.BiFunction<T,U,R> |
biFunction(CheckedBiFunction<T,U,R> checkedBiFunction)
Returns BiFunction that may throw Exception ignoring
throws
Exception clause in the method signature. |
static <T,U> java.util.function.BiPredicate<T,U> |
biPredicate(CheckedBiPredicate<T,U> checkedBiPredicate)
Returns BiPredicate that may throw Exception ignoring
throws
Exception clause in the method signature. |
static <T> java.util.function.Consumer<T> |
consumer(CheckedConsumer<T> checkedConsumer)
Returns Consumer that may throw Exception ignoring
throws
Exception clause in the method signature. |
static <T,R> java.util.function.Function<T,R> |
function(CheckedFunction<T,R> checkedFunction)
Returns Function that may throw Exception ignoring
throws
Exception clause in the method signature. |
static <T> java.util.function.Predicate<T> |
predicate(CheckedPredicate<T> checkedPredicate)
Returns Predicate that may throw Exception ignoring
throws
Exception clause in the method signature. |
static <T> java.util.function.Supplier<T> |
supplier(CheckedSupplier<T> checkedSupplier)
Returns Supplier that may throw Exception ignoring
throws
Exception clause in the method signature. |
static <T extends java.lang.Exception> |
throwUnchecked(java.lang.Exception exception)
Throws Exception.
|
public static <T> java.util.function.Consumer<T> consumer(CheckedConsumer<T> checkedConsumer)
throws
Exception clause in the method signature.T - the input argumentcheckedConsumer - consumer that throws Exceptionpublic static <T,U> java.util.function.BiConsumer<T,U> biConsumer(CheckedBiConsumer<T,U> checkedBiConsumer)
throws
Exception clause in the method signature.T - the first input argumentU - the second input argumentcheckedBiConsumer - biConsumer that throws Exceptionpublic static <T> java.util.function.Predicate<T> predicate(CheckedPredicate<T> checkedPredicate)
throws
Exception clause in the method signature.T - the input argumentcheckedPredicate - predicate that throws Exceptionpublic static <T,U> java.util.function.BiPredicate<T,U> biPredicate(CheckedBiPredicate<T,U> checkedBiPredicate)
throws
Exception clause in the method signature.T - the first input argumentU - the second input argumentcheckedBiPredicate - biPredicate that throws Exceptionpublic static <T> java.util.function.Supplier<T> supplier(CheckedSupplier<T> checkedSupplier)
throws
Exception clause in the method signature.T - the result of supplier executioncheckedSupplier - supplier that throws Exceptionpublic static <T,R> java.util.function.Function<T,R> function(CheckedFunction<T,R> checkedFunction)
throws
Exception clause in the method signature.T - the function argumentR - the function resultcheckedFunction - function that throws Exceptionpublic static <T,U,R> java.util.function.BiFunction<T,U,R> biFunction(CheckedBiFunction<T,U,R> checkedBiFunction)
throws
Exception clause in the method signature.T - the first function argumentU - the second function argumentR - the function resultcheckedBiFunction - biFunction that throws Exceptionpublic static <T extends java.lang.Exception> void throwUnchecked(java.lang.Exception exception)
throws T extends java.lang.Exception
throws Exception to a method
signature.T - the type of the exception to throwexception - exception to throwT - exception throw. Due to Java generic erasure the actual type is always ExceptionT extends java.lang.Exception