ILsaCondition

A condition of the SAPERE incarnation, operating on LSA molecules.

Inheritors

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
abstract 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
abstract fun dispose()

Disposes and releases the resources held by this object.

Link copied to clipboard
abstract fun filter(matches: List<Map<HashString, ITreeNode<out Any>>>, validNodes: List<ILsaNode>, retrieved: List<Map<ILsaNode, List<ILsaMolecule>>>): Boolean
When this method is called, the condition must filter the current matches and allowed nodes.
Link copied to clipboard
abstract fun getMatchingInput(): Observable<out Any>
Observable LSA state used to compute matches for this condition.
Link copied to clipboard
abstract fun getReaction(): 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
abstract fun isValid(): Observable<Boolean>

The live validity of this condition.

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