Class Compose<A>
java.lang.Object
com.jnape.palatable.lambda.semigroup.builtin.Compose<A>
- Type Parameters:
A- the future parameter type
- All Implemented Interfaces:
Fn1<Semigroup<A>,,Fn1<CompletableFuture<A>, Fn1<CompletableFuture<A>, CompletableFuture<A>>>> Fn2<Semigroup<A>,,CompletableFuture<A>, Fn1<CompletableFuture<A>, CompletableFuture<A>>> Fn3<Semigroup<A>,,CompletableFuture<A>, CompletableFuture<A>, CompletableFuture<A>> SemigroupFactory<Semigroup<A>,,CompletableFuture<A>> Applicative<Fn1<CompletableFuture<A>,,Fn1<CompletableFuture<A>, CompletableFuture<A>>>, Fn1<Semigroup<A>, ?>> Cartesian<Semigroup<A>,,Fn1<CompletableFuture<A>, Fn1<CompletableFuture<A>, CompletableFuture<A>>>, Fn1<?, ?>> Cocartesian<Semigroup<A>,,Fn1<CompletableFuture<A>, Fn1<CompletableFuture<A>, CompletableFuture<A>>>, Fn1<?, ?>> Contravariant<Semigroup<A>,,Profunctor<?, Fn1<CompletableFuture<A>, Fn1<CompletableFuture<A>, CompletableFuture<A>>>, Fn1<?, ?>>> Functor<Fn1<CompletableFuture<A>,,Fn1<CompletableFuture<A>, CompletableFuture<A>>>, Fn1<Semigroup<A>, ?>> Profunctor<Semigroup<A>,,Fn1<CompletableFuture<A>, Fn1<CompletableFuture<A>, CompletableFuture<A>>>, Fn1<?, ?>> Monad<Fn1<CompletableFuture<A>,,Fn1<CompletableFuture<A>, CompletableFuture<A>>>, Fn1<Semigroup<A>, ?>> MonadReader<Semigroup<A>,,Fn1<CompletableFuture<A>, Fn1<CompletableFuture<A>, CompletableFuture<A>>>, Fn1<Semigroup<A>, ?>> MonadRec<Fn1<CompletableFuture<A>,,Fn1<CompletableFuture<A>, CompletableFuture<A>>>, Fn1<Semigroup<A>, ?>> MonadWriter<Semigroup<A>,Fn1<CompletableFuture<A>, Fn1<CompletableFuture<A>, CompletableFuture<A>>>, Fn1<Semigroup<A>, ?>>
public final class Compose<A>
extends Object
implements SemigroupFactory<Semigroup<A>,CompletableFuture<A>>
A
Semigroup instance formed by CompletableFuture<A> and a semigroup over
A. If either CompletableFutures completes exceptionally, the result is also an exceptionally
completed future.
Note that this operation only takes as long as the slowest future to complete.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckedApply(Semigroup<A> aSemigroup) Invoke this function with the given argument, potentially throwing anyThrowable.static <A> Compose<A> compose()static <A> Semigroup<CompletableFuture<A>> static <A> Fn1<CompletableFuture<A>, CompletableFuture<A>> compose(Semigroup<A> aSemigroup, CompletableFuture<A> x) static <A> CompletableFuture<A> compose(Semigroup<A> aSemigroup, CompletableFuture<A> x, CompletableFuture<A> y) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jnape.palatable.lambda.functions.Fn1
andThen, carry, cartesian, censor, choose, cocartesian, diMap, diMapR, discardL, flatMap, fmap, lazyZip, listens, local, pure, self, thunk, toFunction, trampolineM, zip, zipMethods inherited from interface com.jnape.palatable.lambda.functions.Fn2
toBiFunctionMethods inherited from interface com.jnape.palatable.lambda.functions.Fn3
apply, apply, checkedApply, compose, contraMap, diMapL, discardR, flip, uncurry, widenMethods inherited from interface com.jnape.palatable.lambda.functions.specialized.SemigroupFactory
apply, checkedApply
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Compose
private Compose()
-
-
Method Details
-
checkedApply
Description copied from interface:Fn2Invoke this function with the given argument, potentially throwing anyThrowable.- Specified by:
checkedApplyin interfaceFn1<Semigroup<A>,Fn1<CompletableFuture<A>, Fn1<CompletableFuture<A>, CompletableFuture<A>>>> - Specified by:
checkedApplyin interfaceFn2<Semigroup<A>,CompletableFuture<A>, Fn1<CompletableFuture<A>, CompletableFuture<A>>> - Specified by:
checkedApplyin interfaceSemigroupFactory<Semigroup<A>,CompletableFuture<A>> - Parameters:
aSemigroup- the argument- Returns:
- the result of the function application
-
compose
-
compose
-
compose
public static <A> Fn1<CompletableFuture<A>,CompletableFuture<A>> compose(Semigroup<A> aSemigroup, CompletableFuture<A> x) -
compose
public static <A> CompletableFuture<A> compose(Semigroup<A> aSemigroup, CompletableFuture<A> x, CompletableFuture<A> y)
-