Builder for a single conditional branch. Use inside a block's .when(cond, target) chain link, Cond::equals("42"), Cond::gt("100"), etc.
Methods
equals
equals(operand: Dynamic) -> ConditionHandle
Match when the comparison value equals the operand. Wire operator: Equals.
| Parameter | Type | Required | Description |
operand | Dynamic | yes | Right-hand-side value the block's comparison_value is checked against, written to the wire as given: "100" as a string, 100 or Number::exact("1.10") as a number. |
gt
gt(operand: Dynamic) -> ConditionHandle
Match when the (numeric) comparison value is greater than the operand. Wire operator: NumberGreaterThan.
| Parameter | Type | Required | Description |
operand | Dynamic | yes | Right-hand-side value the block's comparison_value is checked against, written to the wire as given: "100" as a string, 100 or Number::exact("1.10") as a number. |
lt
lt(operand: Dynamic) -> ConditionHandle
Match when the (numeric) comparison value is less than the operand. Wire operator: NumberLessThan.
| Parameter | Type | Required | Description |
operand | Dynamic | yes | Right-hand-side value the block's comparison_value is checked against, written to the wire as given: "100" as a string, 100 or Number::exact("1.10") as a number. |
ge
ge(operand: Dynamic) -> ConditionHandle
Match when the (numeric) comparison value is greater than or equal to the operand. Wire operator: NumberGreaterOrEqualTo.
| Parameter | Type | Required | Description |
operand | Dynamic | yes | Right-hand-side value the block's comparison_value is checked against, written to the wire as given: "100" as a string, 100 or Number::exact("1.10") as a number. |
le
le(operand: Dynamic) -> ConditionHandle
Match when the (numeric) comparison value is less than or equal to the operand. Wire operator: NumberLessOrEqualTo.
| Parameter | Type | Required | Description |
operand | Dynamic | yes | Right-hand-side value the block's comparison_value is checked against, written to the wire as given: "100" as a string, 100 or Number::exact("1.10") as a number. |
contains
contains(operand: Dynamic) -> ConditionHandle
Match when the comparison value contains the operand. Wire operator: TextContains.
| Parameter | Type | Required | Description |
operand | Dynamic | yes | Right-hand-side value the block's comparison_value is checked against, written to the wire as given: "100" as a string, 100 or Number::exact("1.10") as a number. |
starts_with
starts_with(operand: Dynamic) -> ConditionHandle
Match when the comparison value starts with the operand. Wire operator: TextStartsWith.
| Parameter | Type | Required | Description |
operand | Dynamic | yes | Right-hand-side value the block's comparison_value is checked against, written to the wire as given: "100" as a string, 100 or Number::exact("1.10") as a number. |
ends_with
ends_with(operand: Dynamic) -> ConditionHandle
Match when the comparison value ends with the operand. Wire operator: TextEndsWith.
| Parameter | Type | Required | Description |
operand | Dynamic | yes | Right-hand-side value the block's comparison_value is checked against, written to the wire as given: "100" as a string, 100 or Number::exact("1.10") as a number. |
raw
raw(operator: String, operands: Array) -> ConditionHandle
Escape hatch for unmodelled condition operators.
| Parameter | Type | Required | Description |
operator | String | yes | Wire operator name, for cases where the typed Cond::<op> surface doesn't include the operator yet. |
operands | Array | yes | Operand list, each written to the wire as given; most operators take one operand, some take two. |