SequentialGroup

open class SequentialGroup(cmds: Cmd) : Cmd, Group

Run multiple commands sequentially, finishing when the last one finishes

Parameters

cmds

Commands to run sequentially

Constructors

Link copied to clipboard
fun SequentialGroup(vararg cmds: Cmd)

Properties

Link copied to clipboard
open override val isFinished: Boolean

Finish state of command

Inherited properties

Link copied to clipboard
val name: String

The name of the command

Functions

Link copied to clipboard
override fun addCommands(vararg cmds: Cmd)
Link copied to clipboard
open override fun end()

Final part of a command, called when command finishes.

Link copied to clipboard
open override fun execute()

Main part of a command, called while command is running.

Link copied to clipboard
open override fun initialize()

First part of running a command, called on start of command.

Inherited functions

Link copied to clipboard
fun alongWith(vararg parallel: Cmd): ParallelGroup

Run n commands in parallel with this command, ending when all commands have ended

Link copied to clipboard
fun andPause(seconds: Double): SequentialGroup

Pause for n seconds after this command ends

Link copied to clipboard
fun andThen(vararg next: Cmd): SequentialGroup

Runs n commands sequentially after this command

Link copied to clipboard
fun cancel()

Cancel command. KScheduler.cancel

Link copied to clipboard
fun cancelIf(condition: () -> Boolean): RaceGroup

Cancels this command upon fulfilling a condition

Link copied to clipboard
fun deadlineWith(vararg parallel: Cmd): DeadlineGroup

Runs n commands in parallel with this command, ending when this command ends

Link copied to clipboard
fun raceWith(vararg parallel: Cmd): RaceGroup

Run n commands in parallel with this command, ending when any of the commands has ended

Link copied to clipboard
fun schedule()

Schedule command. Syntax sugar for KScheduler.schedule

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
operator fun unaryPlus()
Link copied to clipboard
fun waitUntil(condition: () -> Boolean): SequentialGroup

Wait until a condition has been fulfilled to run this command

Link copied to clipboard
fun withName(commandName: String): Cmd

Name the current command, which shows up in the logger.

Link copied to clipboard
fun withTimeout(time: Double): RaceGroup

Cancels this command after some time if not finished