Class AbstractNode

java.lang.Object
com.aquima.interactions.dtree.impl.AbstractNode
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AssetAction, AttributeAction, ContainerAction, DecisionTreeCondition, SubTreeAction

public abstract class AbstractNode extends Object implements Serializable
Base class for decision tree nodes.
Since:
5.0
Author:
F. van der Meer
See Also:
  • Constructor Details

  • Method Details

    • getChildren

      public abstract AbstractNode[] 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

      protected IDecisionTree getTree()
    • getQuestionAttribute

      protected AttributeReference getQuestionAttribute()
      Returns the question attribute when a question is in place for this condition.
      Returns:
      AttributeReference, can be null
    • getCondition

      protected ICondition 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

      protected AssetAction toAssetAction()
    • toAttributeAction

      protected AttributeAction toAttributeAction()
    • toContainerAction

      protected ContainerAction toContainerAction()
    • toSubtreeAction

      protected SubTreeAction toSubtreeAction()
    • toString

      public String toString()
      Overrides:
      toString in class Object