java.lang.Object
com.aquima.interactions.expressions.tsl.evaluator.nodes.ConditionNode
All Implemented Interfaces:
ITslNode

public class ConditionNode extends Object implements ITslNode
TSL node representing a condition.
Since:
6.4
Author:
O. Kerpershoek
  • Constructor Details

    • ConditionNode

      public ConditionNode(IExpr condition, ITslNode thenNode, ITslNode elseNode)
      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

      public IExpr getCondition()
      This method returns the condition expression.
      Returns:
      the condition expression.
    • getThenNode

      public ITslNode 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

      public ITslNode 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

      public void expand(IValueSource source, OutputBuffer output, ILanguage language)
      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.
      Specified by:
      expand in interface ITslNode
      Parameters:
      source - Object containing the values for the current domain.
      output - The output buffer the result of this node should be appended to.
      language - The language for which the node should be evaluated.
    • visit

      public void visit(ITslNodeVisitor visitor)
      Description copied from interface: ITslNode
      This method allows visitation of the node. The visit method will not invoke the visitor for any child nodes.
      Specified by:
      visit in interface ITslNode
      Parameters:
      visitor - The visitor that should be invoked for this node.
    • toString

      public String toString()
      Overrides:
      toString in class Object