IGraphedElement.java 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package classes;
  2. public interface IGraphedElement {
  3. public static final boolean STRETCH_BY_DEFAULT=false;
  4. /**
  5. * Sets the local period of the element.
  6. * If the simulation has 100 steps and the local period is 50,
  7. * then there will be two full cycles during the simulation.
  8. * @param period The local period for this element.
  9. */
  10. void setLocalPeriod(int period);
  11. /**
  12. * Used to query the local period of an element.
  13. * @return The local period of this element.
  14. * This should return the set local period,
  15. * which may be anything, even if the component is set to be "stretching",
  16. * that is,
  17. * acting as if the local period was the same
  18. * as the number of total iterations for this simulation.
  19. */
  20. int getLocalPeriod();
  21. /**
  22. * @return Whether the given graph points
  23. * should be stretched(or compressed) over the entire simulation.
  24. * as opposed to repeated once the period is over.
  25. */
  26. boolean isStretching();
  27. /**
  28. * Adjusts whether the element should act
  29. * as if local period was the same as the simulation's number of iterations.
  30. * @param stretch
  31. */
  32. void setStretching(boolean stretch);
  33. }