Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public void createGraph() {
  2. ComputerNode c1 = new ComputerNode (0, 2); // computer 0 at time stamp 2
  3. ComputerNode c2 = new ComputerNode(1,2); // computer 1 at timestamp 2
  4. c1.addNeighbor(c2); // adding an edge
  5. c2.addNeighbor(c1);
  6.  
  7. map.put(0, c1);
  8.  
  9. map.put(0, listComputers.add(c2));
  10.  
  11. map.put(1, listComputers.add(c2));
  12. //map.entrySet(0, c1);
  13.  
  14.  
  15. if(listComputers.contains(c1)) {
  16.  
  17. } else {
  18. listComputers.add(c1);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement