Package cloud.commandframework.tasks
Class TaskRecipe.TaskRecipeComponentOutputting<I,O>
- java.lang.Object
-
- cloud.commandframework.tasks.TaskRecipe.TaskRecipeComponentOutputting<I,O>
-
- Type Parameters:
I- Input typeO- Output type
- Enclosing class:
- TaskRecipe
public final class TaskRecipe.TaskRecipeComponentOutputting<I,O> extends java.lang.ObjectRepresents a partial recipe
-
-
Method Summary
Modifier and Type Method Description TaskRecipe.TaskRecipeComponentVoid<O>asynchronous(@NonNull TaskConsumer<O> consumer)Add a new asynchronous step, consuming the input of the earlier step<T> TaskRecipe.TaskRecipeComponentOutputting<O,T>asynchronous(@NonNull TaskFunction<O,T> function)Add a new asynchronous step, consuming the input of the earlier stepvoidexecute()Execute the recipevoidexecute(@NonNull java.lang.Runnable callback)Execute the recipeTaskRecipe.TaskRecipeComponentVoid<O>synchronous(@NonNull TaskConsumer<O> consumer)Add a new synchronous step, consuming the input of the earlier step<T> TaskRecipe.TaskRecipeComponentOutputting<O,T>synchronous(@NonNull TaskFunction<O,T> function)Add a new synchronous step, consuming the input of the earlier step
-
-
-
Method Detail
-
synchronous
public <T> TaskRecipe.TaskRecipeComponentOutputting<O,T> synchronous(@NonNull TaskFunction<O,T> function)
Add a new synchronous step, consuming the input of the earlier step- Type Parameters:
T- Output type- Parameters:
function- Function mapping the input to some output- Returns:
- New task recipe component
-
asynchronous
public <T> TaskRecipe.TaskRecipeComponentOutputting<O,T> asynchronous(@NonNull TaskFunction<O,T> function)
Add a new asynchronous step, consuming the input of the earlier step- Type Parameters:
T- Output type- Parameters:
function- Function mapping the input to some output- Returns:
- New task recipe component
-
synchronous
public TaskRecipe.TaskRecipeComponentVoid<O> synchronous(@NonNull TaskConsumer<O> consumer)
Add a new synchronous step, consuming the input of the earlier step- Parameters:
consumer- Consumer that consumes the input- Returns:
- New task recipe component
-
asynchronous
public TaskRecipe.TaskRecipeComponentVoid<O> asynchronous(@NonNull TaskConsumer<O> consumer)
Add a new asynchronous step, consuming the input of the earlier step- Parameters:
consumer- Consumer that consumes the input- Returns:
- New task recipe component
-
execute
public void execute(@NonNull java.lang.Runnable callback)
Execute the recipe- Parameters:
callback- Callback function
-
execute
public void execute()
Execute the recipe
-
-