Class AbstractTreeNodeFactory

    • Constructor Detail

      • AbstractTreeNodeFactory

        public AbstractTreeNodeFactory()
    • Method Detail

      • getTreeNode

        public TreeNode getTreeNode​(char nodeValue)
        Description copied from interface: TreeNodeFactory
        Given the node value create a new tree node.
        Specified by:
        getTreeNode in interface TreeNodeFactory
        Parameters:
        nodeValue - The node value.
        Returns:
        A new tree node.
      • addNodeCreator

        protected void addNodeCreator​(char nodeValue,
                                      NodeCreator creator)
        Add a node creator for the given node value.
        Parameters:
        nodeValue - The node value.
        creator - The node creator instance.
      • createDefaultNode

        protected abstract TreeNode createDefaultNode​(char nodeValue)
        Creates a default tree node where no corresponding node creator has been identified.
        Parameters:
        nodeValue - The node value.
        Returns:
        A default tree node.