Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. package cz.vutbr.feec.mtin;
  2.  
  3. import java.util.Vector;
  4.  
  5. public class Node {
  6. Vector<Node> nodes;
  7. String path;
  8.  
  9.  
  10. public Node(String par_path){
  11. nodes = new Vector<Node>();
  12. path = par_path;
  13. }
  14.  
  15. public void addNode(Node node){
  16. nodes.add(node);
  17. }
  18.  
  19.  
  20. public Node getNodes(int index){
  21. return nodes.get(index);
  22. }
  23.  
  24. public void printNodes(){
  25. for(Node node : nodes){
  26. System.out.println(node.toString());
  27. }
  28. }
  29.  
  30. public String getPath() {
  31. return path;
  32. }
  33.  
  34. public void setPath(String path) {
  35. this.path = path;
  36. }
  37.  
  38. @Override
  39. public String toString() {
  40. // TODO Auto-generated method stub
  41. return path;
  42. }
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement