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
Represents a partial recipe
-
Method Summary
Modifier and TypeMethodDescriptionasynchronous(@NonNull TaskConsumer<O> consumer) Add a new asynchronous step, consuming the input of the earlier stepasynchronous(@NonNull TaskFunction<O, T> function) Add a new asynchronous step, consuming the input of the earlier stepvoidexecute()Execute the recipevoidExecute the recipesynchronous(@NonNull TaskConsumer<O> consumer) Add a new synchronous step, consuming the input of the earlier stepsynchronous(@NonNull TaskFunction<O, T> function) Add a new synchronous step, consuming the input of the earlier step
-
Method Details
-
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
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
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
Execute the recipe- Parameters:
callback- Callback function
-
execute
public void execute()Execute the recipe
-