LocalMode.java 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package interfaces;
  2. public interface LocalMode {
  3. public static final int STANDARD_GRAPH_ACCURACY=100;
  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 true when using his own local Period.
  23. */
  24. boolean isUsingLocalPeriod();
  25. /**
  26. * Determine if it should use his own LocalPeriod or use the global Period over the entire simulation.
  27. * Local Period is opposed to repeated once the period is over.
  28. */
  29. void setUseLocalPeriod(boolean state);
  30. }