fefetl08

NodeArvoreBinaria

May 9th, 2020
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  1. public class Node {
  2.     private int info;
  3.     private Node esquerda;
  4.     private Node direita;
  5.  
  6.     public Node(int info) {
  7.         this.info = info;
  8.         this.esquerda = null;
  9.         this.direita = null;
  10.     }
  11.  
  12.     public void setEsquerda(Node esquerda) {
  13.         this.esquerda = esquerda;
  14.     }
  15.  
  16.     public void setDireita(Node direita) {
  17.         this.direita = direita;
  18.     }
  19.  
  20.     public int getInfo() {
  21.         return info;
  22.     }
  23.  
  24.     public Node getEsquerda() {
  25.         return esquerda;
  26.     }
  27.  
  28.     public Node getDireita() {
  29.         return direita;
  30.     }
  31.  
  32.     public void setInfo(int info) {
  33.         this.info = info;
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment