ConditionBuilder

@AutomationDsl
class ConditionBuilder


Type-safe builder that builds a Condition node.

Summary

Public companion functions

TypedExpression<T>
<T : Any?> constant(value: T)

Public constructors

Create a ConditionBuilder instance.

Public functions

Condition

Build a Condition.

Unit

Build an Expression.

Unit
forDuration(forDuration: Duration?)

Build forDuration.

Public properties

lateinit TypedExpression<Boolean>

The Boolean expression associated with the Condition.

Duration?

The forDuration associated with the Condition.

Public companion functions

constant

fun <T : Any?> constant(value: T): TypedExpression<T>

Public constructors

ConditionBuilder

ConditionBuilder()

Create a ConditionBuilder instance.

Public functions

build

fun build(): Condition

Build a Condition. The condition expression is guaranteed to be boolean at construction time.

expression

fun expression(expression: TypedExpression<Boolean>): Unit

Build an Expression.

Parameters
expression: TypedExpression<Boolean>

The Boolean expression associated with the Condition.

forDuration

fun forDuration(forDuration: Duration?): Unit

Build forDuration.

Parameters
forDuration: Duration?

The duration in milliseconds associated with the Condition. The valid duration is 1min, 30 min.

Public properties

expression

lateinit var expressionTypedExpression<Boolean>

The Boolean expression associated with the Condition.

forDuration

var forDurationDuration?

The forDuration associated with the Condition.