Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. public class Node {
  2.  
  3. String text= " ";
  4. Node left=null;
  5. Node right=null;
  6. boolean isEmpty;
  7.  
  8.  
  9. public Node(String text,Node left,Node right,boolean isEmpty){
  10. this.text = text;
  11. this.left = left;
  12. this.right = right;
  13. this.isEmpty =isEmpty;
  14.  
  15. }
  16.  
  17. public Node(String text){
  18.  
  19. this.text = text;
  20. }
  21.  
  22. public void SetText (String text) {
  23. this.text=text;
  24.  
  25. }
  26.  
  27. public String getText() {
  28. return text;
  29. }
  30. boolean isEmpty(){
  31. return this.isEmpty;
  32.  
  33. }
  34.  
  35. public void setRight(){
  36. this.right=right;
  37. }
  38.  
  39. public Node getRight(){
  40. return right;
  41. }
  42.  
  43. public void setLeft(){
  44. this.left=left;
  45. }
  46.  
  47. public Node getLeft(){
  48. return left;
  49. }
  50.  
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement