Alexis-Coria

Nodo

Oct 27th, 2021
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public class Nodo<ELEMENT> {
  2. private ELEMENT valor;
  3. private Nodo<ELEMENT> next;
  4.  
  5. public Nodo(ELEMENT valor) {
  6. this.valor=valor;
  7. this.next=null;
  8.  
  9. }
  10.  
  11. public ELEMENT getValor() {
  12. return valor;
  13. }
  14.  
  15. public void setValor(ELEMENT valor) {
  16. this.valor = valor;
  17. }
  18.  
  19. public Nodo<ELEMENT> getNext() {
  20. return next;
  21. }
  22.  
  23. public void setNext(Nodo<ELEMENT> next) {
  24. this.next = next;
  25. }
  26.  
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment