Class AbstractNode
java.lang.Object
com.aquima.interactions.dtree.impl.AbstractNode
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AssetAction
,AttributeAction
,ContainerAction
,DecisionTreeCondition
,SubTreeAction
Base class for decision tree nodes.
- Since:
- 5.0
- Author:
- F. van der Meer
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractNode
(IDecisionTree tree, AbstractNode parent, InitializationLookup lookup, IDecisionTreeNodeDS nodeDS) -
Method Summary
Modifier and TypeMethodDescriptionabstract AbstractNode[]
This method returns an array containing the child nodes.protected ICondition
The condition expression in which the 'question-attribute' is used.protected AttributeReference
Returns the question attribute when a question is in place for this condition.protected IDecisionTree
getTree()
boolean
This method returns a boolean indicating if this node represents an action node.protected boolean
protected boolean
boolean
This method returns a boolean indicating if this node represents a condition node.protected boolean
protected boolean
protected AssetAction
protected AttributeAction
protected ContainerAction
toString()
protected SubTreeAction
-
Constructor Details
-
AbstractNode
protected AbstractNode(IDecisionTree tree, AbstractNode parent, InitializationLookup lookup, IDecisionTreeNodeDS nodeDS) throws InitializationException - Throws:
InitializationException
-
-
Method Details
-
getChildren
This method returns an array containing the child nodes.
Note: This method is public to allow test-case access, but should not be used outside the tree engine.
- Returns:
- an array containing the child nodes.
-
getTree
-
getQuestionAttribute
Returns the question attribute when a question is in place for this condition.- Returns:
- AttributeReference, can be null
-
getCondition
The condition expression in which the 'question-attribute' is used.- Returns:
- the condition which is never null
-
isActionNode
public boolean isActionNode()This method returns a boolean indicating if this node represents an action node.- Returns:
- a boolean indicating if this node represents an action node.
-
isCondition
public boolean isCondition()This method returns a boolean indicating if this node represents a condition node.- Returns:
- a boolean indicating if this node represents a condition node.
-
isAssetAction
protected boolean isAssetAction() -
isAttributeAction
protected boolean isAttributeAction() -
isContainerAction
protected boolean isContainerAction() -
isSubtreeAction
protected boolean isSubtreeAction() -
toAssetAction
- Throws:
DecisionTreeException
-
toAttributeAction
- Throws:
DecisionTreeException
-
toContainerAction
- Throws:
DecisionTreeException
-
toSubtreeAction
- Throws:
DecisionTreeException
-
toString
-