MinimumNetwork.java 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package model;
  2. import java.util.ArrayList;
  3. import classes.AbstractCanvasObject;
  4. import classes.HolonObject;
  5. public class MinimumNetwork {
  6. private ArrayList<HolonObject> holonObjectList = new ArrayList<HolonObject>();
  7. private ArrayList<IntermediateCableWithState> edgeList = new ArrayList<IntermediateCableWithState>();
  8. //ToCalculate average path
  9. private ArrayList<AbstractCanvasObject> nodeAndSwitches = new ArrayList<AbstractCanvasObject>();
  10. public MinimumNetwork(ArrayList<HolonObject> holonObjectList, ArrayList<IntermediateCableWithState> edgeList){
  11. this.holonObjectList = holonObjectList;
  12. this.edgeList = edgeList;
  13. }
  14. public ArrayList<HolonObject> getHolonObjectList() {
  15. return holonObjectList;
  16. }
  17. public ArrayList<IntermediateCableWithState> getEdgeList() {
  18. return edgeList;
  19. }
  20. public String toString()
  21. {
  22. String objecte = "[";
  23. for(HolonObject object :holonObjectList) {
  24. objecte += " " + object.getObjName();
  25. }
  26. objecte += "]";
  27. String edges = "[";
  28. for(IntermediateCableWithState edge :edgeList) {
  29. edges += " " + edge.getModel();
  30. }
  31. edges += "]";
  32. return objecte + edges;
  33. }
  34. public ArrayList<AbstractCanvasObject> getNodeAndSwitches() {
  35. return nodeAndSwitches;
  36. }
  37. }