public final class Functions
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T,E extends java.lang.Exception> |
constantExceptionSupplier(T value)
Get a supplier which always returns the same value.
|
static <T> java.util.function.Supplier<T> |
constantSupplier(T value)
Get a supplier which always returns the same value.
|
static <T> java.util.function.BiConsumer<java.util.function.Consumer<T>,T> |
consumerBiConsumer()
Get the singleton consumer which accepts a consumer and an argument to hand to it.
|
static <T,E extends java.lang.Exception> |
exceptionConsumerBiConsumer()
Get the singleton consumer which accepts a consumer and an argument to hand to it.
|
static <E extends java.lang.Exception> |
exceptionRunnableConsumer()
Get the singleton exception consumer which accepts and runs exception runnable instances.
|
static <T,E extends java.lang.Exception> |
exceptionSupplierFunction()
Get the singleton function which accepts a supplier and returns the result of the supplier.
|
static <T,E extends java.lang.Exception> |
exceptionSupplierFunctionBiFunction()
Get the singleton function which accepts a function which accepts a supplier, all of which return the result
of the supplier.
|
static java.util.function.Consumer<java.lang.Runnable> |
runnableConsumer()
Get the singleton consumer which accepts and runs runnable instances.
|
static <T> java.util.function.Function<java.util.function.Supplier<T>,T> |
supplierFunction()
Get the singleton function which accepts a supplier and returns the result of the supplier.
|
static <T> java.util.function.BiFunction<java.util.function.Function<java.util.function.Supplier<T>,T>,java.util.function.Supplier<T>,T> |
supplierFunctionBiFunction()
Get the singleton function which accepts a function which accepts a supplier, all of which return the result
of the supplier.
|
public static java.util.function.Consumer<java.lang.Runnable> runnableConsumer()
public static <E extends java.lang.Exception> ExceptionConsumer<ExceptionRunnable<E>,E> exceptionRunnableConsumer()
E - the exception typepublic static <T> java.util.function.BiConsumer<java.util.function.Consumer<T>,T> consumerBiConsumer()
T - the argument typepublic static <T,E extends java.lang.Exception> ExceptionBiConsumer<ExceptionConsumer<T,E>,T,E> exceptionConsumerBiConsumer()
T - the argument typeE - the exception typepublic static <T> java.util.function.Function<java.util.function.Supplier<T>,T> supplierFunction()
T - the result typepublic static <T,E extends java.lang.Exception> ExceptionFunction<ExceptionSupplier<T,E>,T,E> exceptionSupplierFunction()
T - the result typeE - the exception typepublic static <T> java.util.function.BiFunction<java.util.function.Function<java.util.function.Supplier<T>,T>,java.util.function.Supplier<T>,T> supplierFunctionBiFunction()
T - the result typepublic static <T,E extends java.lang.Exception> ExceptionBiFunction<ExceptionFunction<ExceptionSupplier<T,E>,T,E>,ExceptionSupplier<T,E>,T,E> exceptionSupplierFunctionBiFunction()
T - the result typeE - the exception typepublic static <T> java.util.function.Supplier<T> constantSupplier(T value)
T - the value typevalue - the value to returnpublic static <T,E extends java.lang.Exception> ExceptionSupplier<T,E> constantExceptionSupplier(T value)
T - the value typeE - the exception typevalue - the value to returnCopyright © 2017 JBoss, a division of Red Hat, Inc.