23 lines
400 B
Java
23 lines
400 B
Java
package site.licsber.bitree;
|
|
|
|
public class Node<T> {
|
|
public Node(T data) {
|
|
this.data = data;
|
|
}
|
|
|
|
public Node(T data, Node<T> parent) {
|
|
this.data = data;
|
|
this.parent = parent;
|
|
}
|
|
|
|
public T data;
|
|
public Node<T> left;
|
|
public Node<T> right;
|
|
public Node<T> parent;
|
|
|
|
@Override
|
|
public String toString() {
|
|
return data.toString();
|
|
}
|
|
}
|