CpsEdge.java 956 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. package classes;
  2. public class CpsEdge {
  3. float maxCapacity;
  4. float flow;
  5. CpsObject A;
  6. CpsObject B;
  7. public CpsEdge(CpsObject A, CpsObject B){
  8. setA(A);
  9. setB(B);
  10. this.A.AddConnection(this);
  11. this.B.AddConnection(this);
  12. this.maxCapacity = 100;
  13. }
  14. /**
  15. * @return the capacity
  16. */
  17. public float getCapacity() {
  18. return maxCapacity;
  19. }
  20. /**
  21. * @param cap the Capacity to set
  22. */
  23. public void setCapacity(float cap) {
  24. this.maxCapacity = cap;
  25. }
  26. /**
  27. * @return the flow
  28. */
  29. public float getFlow() {
  30. return flow;
  31. }
  32. /**
  33. * @param flow the flow to set
  34. */
  35. public void setFlow(float flow) {
  36. this.flow = flow;
  37. }
  38. /**
  39. * @return the a
  40. */
  41. public CpsObject getA() {
  42. return A;
  43. }
  44. /**
  45. * @param a the a to set
  46. */
  47. public void setA(CpsObject a) {
  48. A = a;
  49. }
  50. /**
  51. * @return the b
  52. */
  53. public CpsObject getB() {
  54. return B;
  55. }
  56. /**
  57. * @param b the b to set
  58. */
  59. public void setB(CpsObject b) {
  60. B = b;
  61. }
  62. }