-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1238 from santiago1617/master
Updates
- Loading branch information
Showing
7 changed files
with
1,469 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
Program's_Contributed_By_Contributors/Java_Programs/Data_structure/BinaryNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
public class BinaryNode<T> { | ||
|
||
private T content; | ||
private BinaryTree<T> left; | ||
private BinaryTree<T> right; | ||
|
||
public BinaryNode() { | ||
this(null, null, null); | ||
} | ||
|
||
public BinaryNode(T content) { | ||
this(content, null, null); | ||
} | ||
|
||
public BinaryNode(T content, BinaryTree<T> left, BinaryTree<T> right) { | ||
this.content = content; | ||
this.left = left; | ||
this.right = right; | ||
} | ||
|
||
public T getContent() { | ||
return content; | ||
} | ||
|
||
public void setContent(T content) { | ||
this.content = content; | ||
} | ||
|
||
public BinaryTree<T> getLeft() { | ||
return left; | ||
} | ||
|
||
public void setLeft(BinaryTree<T> left) { | ||
this.left = left; | ||
} | ||
|
||
public BinaryTree<T> getRight() { | ||
return right; | ||
} | ||
|
||
public void setRight(BinaryTree<T> right) { | ||
this.right = right; | ||
} | ||
|
||
} |
Oops, something went wrong.