Class ConditionNode
java.lang.Object
com.aquima.interactions.expressions.tsl.evaluator.nodes.ConditionNode
- All Implemented Interfaces:
ITslNode
TSL node representing a condition.
- Since:
- 6.4
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionConditionNode
(IExpr condition, ITslNode thenNode, ITslNode elseNode) Constructs the condition node with the required arguments. -
Method Summary
Modifier and TypeMethodDescriptionvoid
expand
(IValueSource source, OutputBuffer output, ILanguage language) The expand method should evaluate the node for the given language, and append the result to the output buffer supplied.This method returns the condition expression.this method returns the node that should be used if the condition evaluates to false.this method returns the node that should be used if the condition evaluates to true.toString()
void
visit
(ITslNodeVisitor visitor) This method allows visitation of the node.
-
Constructor Details
-
ConditionNode
Constructs the condition node with the required arguments.- Parameters:
condition
- The condition expression that should be evaluated (required).thenNode
- The node that should be expanded when the condition evaluates to true (required).elseNode
- The node that should be expanded when the condition evaluates to false (optional).
-
-
Method Details
-
getCondition
This method returns the condition expression.- Returns:
- the condition expression.
-
getThenNode
this method returns the node that should be used if the condition evaluates to true.- Returns:
- The node that should be used if the condition evaluates to true.
-
getElseNode
this method returns the node that should be used if the condition evaluates to false.- Returns:
- The node that should be used if the condition evaluates to false.
-
expand
Description copied from interface:ITslNode
The expand method should evaluate the node for the given language, and append the result to the output buffer supplied. When the node also contains child elements, this expand method should invoke the child elements too. -
visit
Description copied from interface:ITslNode
This method allows visitation of the node. The visit method will not invoke the visitor for any child nodes. -
toString
-