MinimumNetwork.java 994 B

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