Class TreeModel

    • Constructor Detail

      • TreeModel

        public TreeModel()
        Initializes the model with no nodes.
      • TreeModel

        public TreeModel​(Node root)
        Initializes the tree with the specified root node.
        Parameters:
        root - the root node, can be null
    • Method Detail

      • destroy

        protected void destroy​(Node parent)
        Recursively destroys all nodes (starting at the leaves).
        Parameters:
        parent - the parent to go down from in the hierarchy
      • destroy

        public void destroy()
        Frees up memory in a "destructive" non-reversible way.
        Specified by:
        destroy in interface Destroyable