Trigger

A condition that will link to and execute some Task.

Constructors

Link copied to clipboard
constructor(condition: BooleanSupplier)

Properties

Link copied to clipboard

Inherited properties

Link copied to clipboard

Functions

Link copied to clipboard

Descends into the last binded ScheduledTask for this trigger.

Link copied to clipboard

Alias for or.

Link copied to clipboard

Alias for not.

Link copied to clipboard
protected open override fun newInstance(edge: Condition.Edge, supplier: BooleanSupplier): Scheduler.Trigger

Override this method and construct a new instance of the subclass for self-typing.

Link copied to clipboard
infix fun onChange(task: Task): Scheduler.Trigger

Schedules task when the condition changes from false to true, or true to false.

infix fun onChange(runnable: Runnable): Scheduler.Trigger
fun onChange(name: String?, runnable: Runnable): Scheduler.Trigger
Link copied to clipboard
infix fun onFalse(task: Task): Scheduler.Trigger

Schedules task when the condition changes from true to false.

infix fun onFalse(runnable: Runnable): Scheduler.Trigger
fun onFalse(name: String?, runnable: Runnable): Scheduler.Trigger
Link copied to clipboard
infix fun onTrue(task: Task): Scheduler.Trigger

Schedules task when the condition changes from false to true.

infix fun onTrue(runnable: Runnable): Scheduler.Trigger
fun onTrue(name: String?, runnable: Runnable): Scheduler.Trigger
Link copied to clipboard

Alias for and.

Link copied to clipboard

Schedules task when the condition changes from true to false, and finishes the task under the same condition (true to false) if the task is still running.

Link copied to clipboard

Schedules task when the condition changes from false to true, and finishes the task under the same condition (false to true) if the task is still running.

Link copied to clipboard

Schedules task when the condition changes from true to false, and finishes the task when the same condition changes back to true.

infix fun whileFalse(runnable: Runnable): Scheduler.Trigger
Link copied to clipboard
infix fun whileTrue(task: Task): Scheduler.Trigger

Schedules task when the condition changes from false to true, and finishes the task when the same condition changes back to false.

infix fun whileTrue(runnable: Runnable): Scheduler.Trigger
fun whileTrue(name: String?, runnable: Runnable): Scheduler.Trigger

Inherited functions

Link copied to clipboard

Creates a new self-type Condition that is the logical AND of this Condition and another BooleanSupplier.

Link copied to clipboard
open fun getActive(): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun getAsBoolean(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open operator fun not(): Scheduler.Trigger

Creates a new self-type Condition that is the logical NOT of this Condition.

Link copied to clipboard

Creates a new self-type Condition that is the logical OR of this Condition and another BooleanSupplier.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Mutates this Condition with a delay. The delay will be applied to the output of all exposed methods of this class and dictates a minimum time that the original condition must be true for the output to be true.

Link copied to clipboard

Mutates this Condition to adjust the edge detection for the BooleanSuppliergetAsBoolean method.

Link copied to clipboard

Creates a new self-type Condition that is the logical XOR of this Condition and another BooleanSupplier.