ScopeActivationCondition

This interface represents a scope activation condition object. It is implemented by classes that represent a specific type of activation condition and can keep state during the evaluation of the condition when evaluate is called.

Properties

Link copied to clipboard

A scope activation condition which is always true.

Link copied to clipboard

A scope activation condition which is always false.

Functions

Link copied to clipboard

The allOf method is an extension function for the ScopeActivationCondition interface, allowing you to define a new scope activation condition using the "and"-condition (conjunction of sub-conditions) logic. This method is executed in the context of the parent condition because it is an extension function and will register the body lambda function as a new allOf-condition with the parent condition it is nested in.

Link copied to clipboard

The anyOf method is an extension function for the ScopeActivationCondition interface, allowing you to define a new scope activation condition using the "or"-condition (conjunction of sub-conditions) logic. This method is executed in the context of the parent condition because it is an extension function and will register the body lambda function as a new anyOf-condition with the parent condition it is nested in.

Link copied to clipboard
abstract fun condition(condition: ScopeActivationCondition)

Register child conditions with this condition. This can be called from the higher-order lambda function that is executed during evaluation in order to register conditions in the state of this condition object. Those can then be used in the evaluation of this condition to generate a result.

Link copied to clipboard
abstract fun evaluate(): Boolean

Evaluates the condition. Generally this will execute a higher-order lambda function that is executed in the context of ScopeActivationCondition, so the state of the object can be updated, before evaluating that state into the resulting boolean.

Link copied to clipboard

The expr method is an extension function for the ScopeActivationCondition interface, allowing you to define a new scope activation condition as a boolean expression that indicates whether it can be activated. This method is executed in the context of the parent condition because it is an extension function and will register the body lambda function as a new expr-condition with the parent condition it is nested in.

Link copied to clipboard

The noneOf method is an extension function for the ScopeActivationCondition interface, allowing you to define a new scope activation condition using the "inverse or"-condition logic. This method is executed in the context of the parent condition because it is an extension function and will register the body lambda function as a new noneOf-condition with the parent condition it is nested in.

Link copied to clipboard

The oneOf method is an extension function for the ScopeActivationCondition interface, allowing you to define a new scope activation condition using the "exclusive or"-condition logic. This method is executed in the context of the parent condition because it is an extension function and will register the body lambda function as a new oneOf-condition with the parent condition it is nested in.