Trigger

utils.TriggerDSL.Trigger
trait Trigger[A]

Represents a generic trigger condition.

A Trigger takes an entity context and evaluates to a boolean, indicating whether the condition is met.

Type parameters

A

The type of the entity (context) on which the trigger evaluates.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def eval(c: A): Boolean

Evaluates the trigger condition against the given entity context.

Evaluates the trigger condition against the given entity context.

Value parameters

c

The entity context.

Attributes

Returns

True if the condition is met, false otherwise.

Concrete methods

infix def &&(b: Trigger[A]): Trigger[A]
Extension method from TriggerDSL

Composes two triggers with a logical AND operation. Both triggers must evaluate to true for the combined trigger to be true.

Composes two triggers with a logical AND operation. Both triggers must evaluate to true for the combined trigger to be true.

Value parameters

b

The right-hand side Trigger.

Attributes

Returns

A new Trigger representing the logical AND.

def unary_!: Trigger[A]
Extension method from TriggerDSL

Negates the result of a trigger (logical NOT operation).

Negates the result of a trigger (logical NOT operation).

Attributes

Returns

A new Trigger representing the logical NOT.

infix def ||(b: Trigger[A]): Trigger[A]
Extension method from TriggerDSL

Composes two triggers with a logical OR operation. At least one trigger must evaluate to true for the combined trigger to be true.

Composes two triggers with a logical OR operation. At least one trigger must evaluate to true for the combined trigger to be true.

Value parameters

b

The right-hand side Trigger.

Attributes

Returns

A new Trigger representing the logical OR.