Package com.marcusslover.plus.lib.common
Class Delegates
java.lang.Object
com.marcusslover.plus.lib.common.Delegates
A collection of utility methods for delegating Java 8 functions
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Supplier<T> callableToSupplier(Callable<T> callable) static <T> ThrowableSupplier<Exception, T> callableToThrowableSupplier(Callable<T> callable) static <T,U> BiConsumer <T, U> consumerToBiConsumerFirst(Consumer<T> consumer) static <T,U> BiConsumer <T, U> consumerToBiConsumerSecond(Consumer<U> consumer) static <T,U> Function <T, U> consumerToFunction(Consumer<T> consumer) static <T,U> BiPredicate <T, U> predicateToBiPredicateFirst(Predicate<T> predicate) static <T,U> BiPredicate <T, U> predicateToBiPredicateSecond(Predicate<U> predicate) static <T> Consumer<T> runnableToConsumer(Runnable runnable) static <T,U> Function <T, U> runnableToFunction(Runnable runnable) runnableToSupplier(Runnable runnable) static <T extends Exception>
ThrowableSupplier<Exception, Void> runnableToThrowableSupplier(ThrowableRunnable<T> handler) static ThrowableSupplier<Exception, Void> runnableToThrowableSupplier(Runnable runnable)
-
Method Details
-
runnableToConsumer
-
runnableToThrowableSupplier
public static <T extends Exception> ThrowableSupplier<Exception,Void> runnableToThrowableSupplier(ThrowableRunnable<T> handler) -
runnableToThrowableSupplier
-
callableToThrowableSupplier
-
runnableToSupplier
-
callableToSupplier
-
consumerToBiConsumerFirst
-
consumerToBiConsumerSecond
-
predicateToBiPredicateFirst
-
predicateToBiPredicateSecond
-
consumerToFunction
-
runnableToFunction
-