SequenceBuilder<T : Object, U : Object>
A builder for Sequence<T,U>.
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
Methods
Adds a task to the sequence.
Returns: This builder to chain calls.
Return Type: SequenceBuilder<T,U>
Parameter | Type | Description |
---|---|---|
Parameter task | Type ISequenceTask<T,U> | Description The task to add. |
Runs the function as part of the sequence.
Returns: This builder to chain calls.
Return Type: SequenceBuilder<T,U>
Parameter | Type | Description |
---|---|---|
Parameter function | Type BiConsumer<T,SequenceContext<T,U>> | Description The function to run. |
Runs the function as part of the sequence.
Returns: This builder to chain calls.
Return Type: SequenceBuilder<T,U>
Parameter | Type | Description |
---|---|---|
Parameter function | Type Consumer<T> | Description The function to run. |
Sleep (wait) for the given amount of ticks.
Returns: This builder to chain calls.
Return Type: SequenceBuilder<T,U>
Parameter | Type | Description |
---|---|---|
Parameter ticks | Type long | Description The amount of ticks to wait. |
Sleeps until the given condition is met.
Returns: This builder to chain calls.
Return Type: SequenceBuilder<T,U>
Parameter | Type | Description |
---|---|---|
Parameter condition | Type BiPredicate<T,SequenceContext<T,U>> | Description The condition to wait for. |
Sleeps until the given condition is met.
Returns: This builder to chain calls.
Return Type: SequenceBuilder<T,U>
Parameter | Type | Description |
---|---|---|
Parameter condition | Type Predicate<T> | Description The condition to wait for. |
Builds and starts the sequence.
Returns: The sequence that was built.
Return Type: Sequence<T,U>
Runs the function as part of the sequence.
This method is an alias for run
Returns: This builder to chain calls.
Return Type: SequenceBuilder<T,U>
Parameter | Type | Description |
---|---|---|
Parameter function | Type BiConsumer<T,SequenceContext<T,U>> | Description The function to run. |
Runs the function as part of the sequence.
This method is an alias for run
Returns: This builder to chain calls.
Return Type: SequenceBuilder<T,U>
Parameter | Type | Description |
---|---|---|
Parameter function | Type Consumer<T> | Description The function to run. |