MinimumNetwork.java 915 B

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