getVariableTerms method
Retrieves all variables present in the expression, including composite
variables like x^2 or x*y.
Returns: A Set containing all distinct Variable objects found in the expression.
Implementation
@override
Set<Variable> getVariableTerms() {
return {
...condition.getVariableTerms(),
...ifTrue.getVariableTerms(),
...ifFalse.getVariableTerms()
};
}