AbstractNodeCondition

abstract class AbstractNodeCondition<T>(reaction: Reaction<T>, val targetNode: Node<T>) : AbstractCondition<T>

Base implementation of a Condition evaluated on a target targetNode, owned by a reaction with any host.

When cloned, a condition targeting the host of its reaction targets the host of the new reaction, which must be a node; a condition targeting any other node keeps its target.

Inheritors

Constructors

Link copied to clipboard
constructor(reaction: Reaction<T>, targetNode: Node<T>)

Properties

Link copied to clipboard
override val isValid: Observable<Boolean>

The live validity of this condition.

Link copied to clipboard
open override val reaction: Reaction<T>

The reaction owning this condition. Its Reaction.host is the model entity hosting the condition, which may differ from the node it targets, if any.

Link copied to clipboard

Functions

Link copied to clipboard

Signals that the owning reaction is about to fire. Used to implement conditions latched to changes that occur in-between reaction executions.

Link copied to clipboard
override fun cloneCondition(newReaction: Reaction<T>): Condition<T>

Creates an equivalent condition owned by newReaction, such as a reaction cloned onto a new node. A condition targeting the host of its reaction targets the host of newReaction, which must then be a Node; a condition targeting any other node keeps its target.

Link copied to clipboard
open override fun dispose()

Disposes and releases the resources held by this object.

Link copied to clipboard
infix fun Condition<*>.shouldEqual(other: Condition<*>)
Link copied to clipboard
open override fun toString(): String