MinimumNetwork.java 1.3 KB

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