Class Condition
- java.lang.Object
-
- com.aquima.interactions.expressions.semantics.SemanticNodeBase
-
- com.aquima.interactions.expressions.semantics.nodes.Condition
-
- All Implemented Interfaces:
ISemanticNode
public class Condition extends SemanticNodeBase
This class contains a condition expression which will always evaluate to a boolean.- Since:
- 6.0
- Author:
- O. Kerpershoek, F. van der Meer
-
-
Constructor Summary
Constructors Constructor Description Condition(Position position, Operator opr, ISemanticNode left, ISemanticNode right)
Constructs the condition node with the required arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collectScopedObjects(ScopedObjects resultSet)
This method may be used to collect the names of the objects that need to be in scope in order to evaluate the expression of this node.ISemanticNode[]
getChildNodes()
This method returns an array containing the child nodes.ISemanticNode
getLeftExpression()
This method returns the left hand side expression of the operator.Operator
getOperator()
This method returns the operator of this expression.ISemanticNode
getRightExpression()
This method returns the right hand side expression of the operator.String
toString()
void
visit(ISemanticNodeVisitor visitor)
This method allows a type safe visitation of the node.-
Methods inherited from class com.aquima.interactions.expressions.semantics.SemanticNodeBase
addMessage, getDataType, getDomain, getMessages, getPosition, getType, hasMessage, isDerivedType, isMultivalue, setDerived, setDomain, setType, setType
-
-
-
-
Constructor Detail
-
Condition
public Condition(Position position, Operator opr, ISemanticNode left, ISemanticNode right)
Constructs the condition node with the required arguments.- Parameters:
position
- The position information for the node.opr
- The condition operator.left
- The left-hand-side of the condition expression.right
- The right-hand-side of the condition expression.
-
-
Method Detail
-
getOperator
public Operator getOperator()
This method returns the operator of this expression.- Returns:
- the operator of this expression.
-
getLeftExpression
public ISemanticNode getLeftExpression()
This method returns the left hand side expression of the operator.- Returns:
- the left hand side expression of the operator.
-
getRightExpression
public ISemanticNode getRightExpression()
This method returns the right hand side expression of the operator.- Returns:
- the right hand side expression of the operator.
-
getChildNodes
public ISemanticNode[] getChildNodes()
Description copied from interface:ISemanticNode
This method returns an array containing the child nodes. The order of the child nodes in the array is not defined, and the array may be empty for nodes that do not have child nodes.- Returns:
- Array containing the child nodes of this node.
-
collectScopedObjects
public void collectScopedObjects(ScopedObjects resultSet)
Description copied from interface:ISemanticNode
This method may be used to collect the names of the objects that need to be in scope in order to evaluate the expression of this node. The object passed to the method will be enriched with the names of the objects that need to be in scope.- Parameters:
resultSet
- The object that should be used to add the names of the objects that need to be in scope to.
-
visit
public void visit(ISemanticNodeVisitor visitor)
Description copied from interface:ISemanticNode
This method allows a type safe visitation of the node. The visit method will not invoke the visitor for any child nodes.- Parameters:
visitor
- The visitor that should be invoked for this node.
-
toString
public String toString()
- Overrides:
toString
in classSemanticNodeBase
-
-