Class ConditionDefinition

java.lang.Object
com.aquima.interactions.expressions.tsl.parse.nodes.ConditionDefinition
All Implemented Interfaces:
IParseNode

public class ConditionDefinition extends Object implements IParseNode
This node holds a condition definition.
Since:
5.0
Author:
O. Kerpershoek
  • Constructor Details

    • ConditionDefinition

      public ConditionDefinition(int position, String condition, IParseNode thenNode, IParseNode elseNode)
      Constructs the parse node with the required arguments.
      Parameters:
      position - The position of the node in the TSL expression
      condition - The condition expression.
      thenNode - The node that should be used if the condition evaluates to true.
      elseNode - The node that should be used if the condition evaluates to false.
  • Method Details

    • getCondition

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

      public IParseNode 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 IParseNode 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.
    • getPosition

      public int getPosition()
      Description copied from interface: IParseNode
      This method returns the position in the original text where the node started.
      Specified by:
      getPosition in interface IParseNode
      Returns:
      The character position in the original text where the node started.