carry the code from core-java to data-structures module
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package com.baeldung.printbinarytree;
|
||||
|
||||
public class BinaryTreeModel {
|
||||
|
||||
private Object value;
|
||||
private BinaryTreeModel left;
|
||||
private BinaryTreeModel right;
|
||||
|
||||
public BinaryTreeModel(Object value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(Object value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public BinaryTreeModel getLeft() {
|
||||
return left;
|
||||
}
|
||||
|
||||
public void setLeft(BinaryTreeModel left) {
|
||||
this.left = left;
|
||||
}
|
||||
|
||||
public BinaryTreeModel getRight() {
|
||||
return right;
|
||||
}
|
||||
|
||||
public void setRight(BinaryTreeModel right) {
|
||||
this.right = right;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user