APL/DEV 3.2/TP07/Repertoires/Tree.java

20 lines
342 B
Java
Raw Normal View History

2022-11-24 15:17:33 +01:00
public class Tree<T> {
private Node<T> rootNode;
public Tree() {
rootNode = new Node<T>(null);
}
public void setRootNode(Node<T> rootNode) {
this.rootNode = rootNode;
}
public Node<T> getRootNode() {
return rootNode;
}
public void showTree() {
rootNode.showNode(0);
}
}