Skip to content

Instantly share code, notes, and snippets.

Created December 9, 2015 22:31
What would you like to do?
public static class CompositionSources<B>
private CompositionSources(){ }
public interface Partial<B>
CompletableFuture<Outcome<B>> apply(CompletableFuture<Outcome<B>> b);
public interface MergingStage<B, V>{
Partial<B> by(BiFunction<Outcome<B>, Outcome<V>, Outcome<B>> f);
public <V> MergingStage<B, V> value(CompletableFuture<Outcome<V>> value){
return f -> builder
-> builder.thenCombine(value, (b, v) -> f.apply(b, v)
public static <B> CompositionSources<B> stickedTo(Class<B> clazz)
return new CompositionSources<>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment