Package de.scravy.bedrock
Class Control.Async<In,Out>
java.lang.Object
de.scravy.bedrock.Control.Async<In,Out>
- All Implemented Interfaces:
ThrowingBiConsumer<In,Callback<Out>>,BiConsumer<In,Callback<Out>>,Function<In,Promise<Out>>
- Enclosing class:
- Control
public static final class Control.Async<In,Out> extends Object implements ThrowingBiConsumer<In,Callback<Out>>, Function<In,Promise<Out>>
-
Method Summary
Modifier and Type Method Description Promise<Out>apply(In in)voidconsume(In argument, Callback<Out> callback)voidrun(In argument, Callback<Out> callback)voidrun(Executor executor, In argument, Callback<Out> callback)Promise<Out>runPromised(In argument)Promise<Out>runPromised(Executor executor, In argument)<T> Control.Async<In,T>then(ThrowingBiConsumer<Out,Callback<T>> function)<T> Control.Async<In,Seq<T>>then(ThrowingBiConsumer<Out,Callback<T>> function, ThrowingBiConsumer<Out,Callback<T>>... functions)
-
Method Details
-
then
@Nonnull public final <T> Control.Async<In,T> then(@Nonnull ThrowingBiConsumer<Out,Callback<T>> function) -
then
@Nonnull @SafeVarargs public final <T> Control.Async<In,Seq<T>> then(@Nonnull ThrowingBiConsumer<Out,Callback<T>> function, @Nonnull ThrowingBiConsumer<Out,Callback<T>>... functions) -
run
-
run
-
runPromised
-
runPromised
-
consume
- Specified by:
consumein interfaceThrowingBiConsumer<In,Out>
-
apply
-