SubNet.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package classes;
  2. import java.util.ArrayList;
  3. /**
  4. * The class "subNet" represents ....
  5. *
  6. * @author Gruppe14
  7. *
  8. */
  9. public class SubNet {
  10. private ArrayList<HolonObject> subNetObjects;
  11. private ArrayList<CpsEdge> subNetEdges;
  12. private ArrayList<HolonSwitch> subNetSwitches;
  13. private Position pos;
  14. /**
  15. * Constructor for a Subnet.
  16. *
  17. * @param objects
  18. * Objects in the Subnet
  19. * @param edges
  20. * Edges in the Subnet
  21. * @param switches
  22. * Switches in the Subnet
  23. */
  24. public SubNet(ArrayList<HolonObject> objects, ArrayList<CpsEdge> edges, ArrayList<HolonSwitch> switches) {
  25. subNetObjects = objects;
  26. subNetEdges = edges;
  27. subNetSwitches = switches;
  28. }
  29. /**
  30. * Return all Objects in the Subnet.
  31. *
  32. * @return all Objects in the Subnet
  33. */
  34. public ArrayList<HolonObject> getObjects() {
  35. return subNetObjects;
  36. }
  37. /**
  38. * Return all Edges in the Subnet.
  39. *
  40. * @return all Edges in the Subnet
  41. */
  42. public ArrayList<CpsEdge> getEdges() {
  43. return subNetEdges;
  44. }
  45. /**
  46. * Return all Switches in the Subnet.
  47. *
  48. * @return all Switches in the Subnet
  49. */
  50. public ArrayList<HolonSwitch> getSwitches() {
  51. return subNetSwitches;
  52. }
  53. public Position getPos() {
  54. return pos;
  55. }
  56. public void setPos(Position pos) {
  57. this.pos = pos;
  58. }
  59. public void setPos(int x, int y){
  60. this.pos.x = x;
  61. this.pos.y = y;
  62. }
  63. }