AbstractAlgorithmSuperClass.java 619 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package api;
  2. /**
  3. * API Algorithm Super Class.
  4. *
  5. * @author Gruppe14
  6. */
  7. public abstract class AbstractAlgorithmSuperClass {
  8. private CpsAPI api;
  9. /**
  10. * Constructor.
  11. *
  12. * @param api
  13. * the API
  14. */
  15. public AbstractAlgorithmSuperClass(CpsAPI api) {
  16. this.api = api;
  17. }
  18. /**
  19. * Returns the API.
  20. *
  21. * @return The API
  22. */
  23. public CpsAPI getAPI() {
  24. return api;
  25. }
  26. /**
  27. * Sets the API.
  28. *
  29. * @param api
  30. * the API
  31. */
  32. public void setAPI(CpsAPI api) {
  33. this.api = api;
  34. }
  35. /**
  36. * This method will be called in each Iteration.
  37. */
  38. abstract public void runAlgorithm();
  39. }