public class Unchecked extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T,U> BiConsumer<T,U> |
consumer(UncheckedBiConsumer<T,U> consumer)
Transforms the given (unchecked) bi-consumer into a regular bi-consumer.
|
static <T> Consumer<T> |
consumer(UncheckedConsumer<T> consumer)
Transforms the given (unchecked) consumer into a regular consumer.
|
static <T,U,R> BiFunction<T,U,R> |
function(UncheckedBiFunction<T,U,R> function)
Transforms the given (unchecked) bi-function into a regular bi-function.
|
static <T,R> Function<T,R> |
function(UncheckedFunction<T,R> function)
Transforms the given (unchecked) function into a regular function.
|
static <T> Supplier<T> |
supplier(UncheckedSupplier<T> supplier)
Transforms the given (unchecked) supplier into a regular supplier.
|
static <T,U> UncheckedBiConsumer<T,U> |
unchecked(BiConsumer<T,U> consumer)
Transforms the given bi-consumer into a version that can throw exceptions.
|
static <T,U,R> UncheckedBiFunction<T,U,R> |
unchecked(BiFunction<T,U,R> function)
Transforms the given bi-function into a version that can throw exceptions.
|
static <T> UncheckedConsumer<T> |
unchecked(Consumer<T> consumer)
Transforms the given consumer into a version that can throw exceptions.
|
static <T,R> UncheckedFunction<T,R> |
unchecked(Function<T,R> function)
Transforms the given function into a version that can throw exceptions.
|
static <T> UncheckedSupplier<T> |
unchecked(Supplier<T> supplier)
Transforms the given supplier into a version that can throw exceptions.
|
public static <T,U,R> UncheckedBiFunction<T,U,R> unchecked(BiFunction<T,U,R> function)
T - the type of the first argument to the functionU - the type of the second argument to the functionR - the type of the result of the functionfunction - the functionUncheckedBiFunctionpublic static <T,R> UncheckedFunction<T,R> unchecked(Function<T,R> function)
T - the type of the argument to the functionR - the type of the result of the functionfunction - the functionUncheckedFunctionpublic static <T> UncheckedConsumer<T> unchecked(Consumer<T> consumer)
T - the type of the input to the operationconsumer - the consumerUncheckedConsumerpublic static <T,U> UncheckedBiConsumer<T,U> unchecked(BiConsumer<T,U> consumer)
T - the type of the first argument to the operationU - the type of the second argument to the operationconsumer - the consumerUncheckedBiConsumerpublic static <T> UncheckedSupplier<T> unchecked(Supplier<T> supplier)
T - the type of items supplied by this suppliersupplier - the supplierUncheckedSupplierpublic static <T,R> Function<T,R> function(UncheckedFunction<T,R> function)
RuntimeException if
needed.T - the type of the argument to the functionR - the type of the result of the functionfunction - the functionFunction executing the UncheckedFunction. If the operation throws an exception,
the exception is rethrown, wrapped in a RuntimeException if needed.public static <T,U,R> BiFunction<T,U,R> function(UncheckedBiFunction<T,U,R> function)
RuntimeException if
needed.T - the type of the first argument to the functionU - the type of the second argument to the functionR - the type of the result of the functionfunction - the functionBiFunction executing this UncheckedBiFunction. If the operation throws an exception,
the exception is rethrown, wrapped in a RuntimeException if needed.public static <T,U> BiConsumer<T,U> consumer(UncheckedBiConsumer<T,U> consumer)
RuntimeException if
needed.T - the type of the first argument to the operationU - the type of the second argument to the operationconsumer - the consumerBiConsumer executing this UncheckedBiConsumer. If the operation throws an exception,
the exception is rethrown, wrapped in a RuntimeException if needed.public static <T> Consumer<T> consumer(UncheckedConsumer<T> consumer)
RuntimeException if
needed.T - the type of the first argument to the operationconsumer - the consumerConsumer executing this UncheckedConsumer. If the operation throws an exception,
the exception is rethrown, wrapped in a RuntimeException if needed.public static <T> Supplier<T> supplier(UncheckedSupplier<T> supplier)
RuntimeException if
needed.T - the type of items supplied by this suppliersupplier - the supplierSupplier executing this UncheckedSupplier. If the operation throws an exception,
the exception is rethrown, wrapped in a RuntimeException if needed.Copyright © 2019–2020 SmallRye. All rights reserved.