Tree Class
Tree structure used to represent Trees.
Every tree stores Trees as children and have a parent children.
If the parent is null then the Tree is the root.
Methods
add
(
-
tree
Add new element to tree.
Parameters:
-
tree
ObjectObject to be added to the three, if object is not a tree a new tree is created automatically.
clone
()
Tree
Clone tree recursively.
The cloned tree has the same UUID.
Returns:
Tree:
Cloned tree.
print
(
-
level
Print tree into console, recursively.
Parameters:
-
level
NumberRecursive parameter, not required.
remove
(
-
tree
Remove element from tree.
Parameters:
-
tree
TreeElement to be removed from the three