Class ConditionDefinition
java.lang.Object
com.aquima.interactions.expressions.tsl.parse.nodes.ConditionDefinition
- All Implemented Interfaces:
IParseNode
This node holds a condition definition.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionConditionDefinition
(int position, String condition, IParseNode thenNode, IParseNode elseNode) Constructs the parse node with the required arguments. -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the condition expression.this method returns the node that should be used if the condition evaluates to false.int
This method returns the position in the original text where the node started.this method returns the node that should be used if the condition evaluates to true.
-
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 expressioncondition
- 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
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.
-
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 interfaceIParseNode
- Returns:
- The character position in the original text where the node started.
-