Condition class final
A relevant, required or readonly condition. Port of Condition.
- Inheritance
-
- Object
- Triggerable
- Condition
Constructors
- Condition(XPathConditional expr, TreeReference contextRef, {required ConditionAction trueAction, required ConditionAction falseAction})
-
Creates a condition applying
trueActionorfalseAction.
Properties
- canCascade → bool
-
Whether applying this can change values others depend on.
no setteroverride
- context → TreeReference
-
The generic reference used to turn triggers into absolute references.
no setterinherited
- expr → XPathConditional
-
The expression.
finalinherited
- falseAction → ConditionAction
-
Applied when the expression is false.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCascadingToChildren → bool
-
Whether applying this affects the targets' descendants.
no setteroverride
- originalContext → TreeReference
-
The bind's reference, as declared.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
targets
→ Set<
TreeReference> -
The nodes this triggerable sets.
no setterinherited
-
triggers
→ Set<
TreeReference> -
The references this triggerable depends on.
no setterinherited
- trueAction → ConditionAction
-
Applied when the expression is true.
final
Methods
-
addTarget(
TreeReference target) → void -
Adds a node this triggerable sets.
inherited
-
apply(
FormInstance instance, EvaluationContext parentContext, TreeReference context) → List< (TreeReference, Object)> -
Evaluates in
context(a concrete instance of originalContext) and applies the result to every matching target; returns the affected references with the result.inherited -
applyResult(
TreeReference ref, Object result, FormInstance instance) → void -
Applies
resultto the node atref.override -
eval(
FormInstance instance, EvaluationContext ec) → Object -
Evaluates the expression.
override
-
intersectContextWith(
Triggerable other) → void -
Narrows the context to what this and
otherhave in common.inherited -
matches(
Triggerable other) → bool -
Whether
otheris the same kind of triggerable with an equal expression and the same triggers (contexts and targets are ignored).override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited