Class Tree<T>

  • Type Parameters:
    T -

    public class Tree<T>
    extends java.lang.Object
    The tree structure whose value on each tree node is of type T.
    • Constructor Detail

      • Tree

        public Tree()
        Default constructor.
      • Tree

        public Tree​(GenericTreeNode<T> root,
                    GenericTreeNode<T> current)
        Constructor.
        Parameters:
        root - The root node of the tree.
        current - The current node of the tree.
    • Method Detail

      • getRootNode

        public GenericTreeNode<T> getRootNode()
        Returns the root node.
        Returns:
        root node of the tree.
      • setRootNode

        public void setRootNode​(GenericTreeNode<T> rootNode)
        Sets the root node of the tree.
        Parameters:
        rootNode - the root node of the tree.
      • getCurrentNode

        public GenericTreeNode<T> getCurrentNode()
        Returns the current node of the tree.
        Returns:
      • setCurrentNode

        public void setCurrentNode​(GenericTreeNode<T> currentNode)
        Sets the current node of the tree.
        Parameters:
        currentNode - current node.