MinimumNetwork.java 1.2 KB

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