ComputedBooleanCondition

class ComputedBooleanCondition(val name: String, val cost: <Error class: unknown class> = 0.0, evaluator: (context: OperationContext, condition: Condition) -> Boolean) : Condition

Convenient class for a condition that evaluates to true or false.

Parameters

evaluator

evaluation method. Takes condition (this) for use by anonymous inner classes.

Constructors

Link copied to clipboard
constructor(name: String, cost: <Error class: unknown class> = 0.0, evaluator: (context: OperationContext, condition: Condition) -> Boolean)

Properties

Link copied to clipboard
open override val cost: <Error class: unknown class> = 0.0

Cost of evaluating the condition. 0 is cheap, 1 is expensive. Helps in planning.

Link copied to clipboard
open val name: String

Functions

Link copied to clipboard
open infix fun and(b: Condition): Condition
Link copied to clipboard
open override fun evaluate(context: OperationContext): ConditionDetermination

Evaluate the condition in the context of the process. This may be expensive, so the cost is provided. The infrastructure will attempt to call this function infrequently on expensive conditions, so there's no urgency to optimize here.

Link copied to clipboard
open fun infoString(verbose: Boolean?, indent: Int): String
Link copied to clipboard
open operator fun inv(): Condition
Link copied to clipboard
open operator fun not(): Condition
Link copied to clipboard
open infix fun or(b: Condition): Condition
Link copied to clipboard
open override fun toString(): String