Uses of Interface
com.google.mu.function.CheckedSupplier
Package
Description
Some extra functional interfaces.
StringFormat, Substring, Optionals and more...
Parallelizer (parallel stream using Executor), Retryer.
-
Uses of CheckedSupplier in com.google.mu.function
Modifier and TypeMethodDescriptiondefault <R> CheckedSupplier
<R, E> CheckedSupplier.andThen
(CheckedFunction<? super T, ? extends R, ? extends E> mapper) Returns a newCheckedSupplier
that maps the return value usingmapper
. -
Uses of CheckedSupplier in com.google.mu.util
Modifier and TypeMethodDescriptionMaybe.maybe
(CheckedSupplier<? extends T, ? extends E> supplier) Deprecated.Invokessupplier
and wraps the returned object or thrown exception in aMaybe<T, E>
.Maybe.maybe
(CheckedSupplier<? extends T, ? extends E> supplier, Class<E> exceptionType) Deprecated.Wrapssupplier
to be used for a stream of Maybe.Maybe.maybeStream
(CheckedSupplier<? extends Stream<? extends T>, ? extends E> supplier, Class<E> exceptionType) Deprecated.Invokessupplier
and wraps the returnedStream<T>
or thrown exception into a stream ofMaybe<T, E>
.Maybe.maybeStream
(CheckedSupplier<? extends Stream<? extends T>, E> supplier) Deprecated.Invokessupplier
and wraps the returnedStream<T>
or thrown exception into a stream ofMaybe<T, E>
.Optionals.optionally
(boolean condition, CheckedSupplier<? extends T, E> supplier) Returns an Optional that wraps the nullable result fromsupplier
ifcondition
is true, or elseempty()
.Premise.or
(CheckedSupplier<? extends Premise, E> alternative) Evaluatesalternative
ifthis
premise doesn't hold. -
Uses of CheckedSupplier in com.google.mu.util.concurrent
Modifier and TypeMethodDescription<R extends T,
E extends Throwable>
CompletionStage<R> Retryer.ForReturnValue.retry
(CheckedSupplier<? extends R, E> supplier, ScheduledExecutorService retryExecutor) Invokes and possibly retriessupplier
according to the retry strategies specified withuponReturn()
.<T> CompletionStage
<T> Retryer.retry
(CheckedSupplier<T, ?> supplier, ScheduledExecutorService executor) Invokes and possibly retriessupplier
upon exceptions, according to the retry strategies specified withupon()
.<R extends T,
E extends Throwable>
CompletionStage<R> Retryer.ForReturnValue.retryAsync
(CheckedSupplier<? extends CompletionStage<R>, E> asyncSupplier, ScheduledExecutorService retryExecutor) Invokes and possibly retriesasyncSupplier
according to the retry strategies specified withuponReturn()
.<T> CompletionStage
<T> Retryer.retryAsync
(CheckedSupplier<? extends CompletionStage<T>, ?> asyncSupplier, ScheduledExecutorService executor) Invokes and possibly retriesasyncSupplier
upon exceptions, according to the retry strategies specified withupon()
.Retryer.ForReturnValue.retryBlockingly
(CheckedSupplier<R, E> supplier) Invokes and possibly retriessupplier
according to the retry strategies specified withuponReturn()
.<T,
E extends Throwable>
TRetryer.retryBlockingly
(CheckedSupplier<T, E> supplier) Invokes and possibly retriessupplier
upon exceptions, according to the retry strategies specified withupon()
.