Package madkit.kernel

# Interface Scheduler.SimulationTime

Enclosing class:
  Scheduler

public static interface Scheduler.SimulationTime

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DATE_BASED_MODE_REQUIRED`
  `static final String`
  `TICK_BASED_MODE_REQUIRED`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addOneTimeUnit()`
  Adds one time unit to the simulation current time
  `default LocalDateTime`
  `getCurrentDate()`
  Gets the current date
  `default BigDecimal`
  `getCurrentTick()`
  Gets the current tick
  `default ChronoUnit`
  `getDefaultTemporalUnit()`
  Gets the default temporal unit which will be used by `addOneTimeUnit()` and `incrementCurrentDate(long)` in a date-based mode
  `default BigDecimal`
  `getEndTick()`
  returns the tick for which the simulation should end.
  `boolean`
  `hasReachedEndTime()`
  Checks if the simulation has reached the specified end time
  `default void`
  `incrementCurrentDate(long amountToAdd)`
  `default void`
  `incrementCurrentDate(long amountToAdd, ChronoUnit unit)`
  Shortcut for `setCurrentDate(getCurrentDate().plus(amountToAdd, unit));`
  `default void`
  `incrementCurrentTick(double delta)`
  Shortcut for `setCurrentTick(getCurrentTick().add(BigDecimal.valueOf(delta)));`
  `default void`
  `incrementCurrentTick(BigDecimal delta)`
  Shortcut for `setCurrentTick(getCurrentTick().add(delta));`
  `default void`
  `setCurrentDate(LocalDateTime date)`
  Shortcut for `setCurrentDate(getCurrentDate().plus(amountToAdd, unit));`
  `default void`
  `setCurrentTick(double value)`
  Shortcut for `setCurrentTick(BigDecimal.valueOf(value));`
  `default void`
  `setCurrentTick(BigDecimal value)`
  Sets the current tick a the simulation to the specified value
  `default void`
  `setDefaultTemporalUnit(ChronoUnit unit)`
  Sets the default temporal unit which will be used by `addOneTimeUnit()` and `incrementCurrentDate(long)` in a date-based mode
  `default void`
  `setEndDate(LocalDateTime endDate)`
  Sets the date at which the simulation should stop
  `default void`
  `setEndTick(BigDecimal endTick)`
  Sets the tick at which the simulation should end

- ## Field Details

  - ### TICK_BASED_MODE_REQUIRED

    static final String TICK_BASED_MODE_REQUIRED
    See Also:
      - Constant Field Values

  - ### DATE_BASED_MODE_REQUIRED

    static final String DATE_BASED_MODE_REQUIRED
    See Also:
      - Constant Field Values

- ## Method Details

  - ### setCurrentTick

    default void setCurrentTick(BigDecimal value)
    Sets the current tick a the simulation to the specified value
    Parameters:
      `value` -

  - ### setCurrentTick

    default void setCurrentTick(double value)
    Shortcut for `setCurrentTick(BigDecimal.valueOf(value));`
    Parameters:
      `value` - specifies the current tick value

  - ### setCurrentDate

    default void setCurrentDate(LocalDateTime date)
    Shortcut for `setCurrentDate(getCurrentDate().plus(amountToAdd, unit));`
    Parameters:
      `date` - the date to set as current date

  - ### getCurrentTick

    default BigDecimal getCurrentTick()
    Gets the current tick
    Returns:
      the current tick of the simulation

  - ### getCurrentDate

    default LocalDateTime getCurrentDate()
    Gets the current date
    Returns:
      the current date of the simulation

  - ### addOneTimeUnit

    void addOneTimeUnit()
    Adds one time unit to the simulation current time

  - ### hasReachedEndTime

    boolean hasReachedEndTime()
    Checks if the simulation has reached the specified end time
    Returns:
      `true` if the simulation should be stopped.

  - ### incrementCurrentTick

    default void incrementCurrentTick(BigDecimal delta)
    Shortcut for `setCurrentTick(getCurrentTick().add(delta));`
    Parameters:
      `delta` - specifies how much time should be added

  - ### incrementCurrentTick

    default void incrementCurrentTick(double delta)
    Shortcut for `setCurrentTick(getCurrentTick().add(BigDecimal.valueOf(delta)));`
    Parameters:
      `delta` - specifies how much time should be added

  - ### incrementCurrentDate

    default void incrementCurrentDate(long amountToAdd, ChronoUnit unit)
    Shortcut for `setCurrentDate(getCurrentDate().plus(amountToAdd, unit));`
    Parameters:
      `amountToAdd` - the amount of the unit to add to the result, may be negative
      `unit` - the unit of the amount to add, not null

  - ### incrementCurrentDate

    default void incrementCurrentDate(long amountToAdd)
    Parameters:
      `amountToAdd` - the amount of default temporal unit to add
    See Also:
      - `setDefaultTemporalUnit(ChronoUnit)`

  - ### setDefaultTemporalUnit

    default void setDefaultTemporalUnit(ChronoUnit unit)
    Sets the default temporal unit which will be used by `addOneTimeUnit()` and `incrementCurrentDate(long)` in a date-based mode
    Parameters:
      `unit` - a temporal unit as defined in `ChronoUnit`

  - ### getDefaultTemporalUnit

    default ChronoUnit getDefaultTemporalUnit()
    Gets the default temporal unit which will be used by `addOneTimeUnit()` and `incrementCurrentDate(long)` in a date-based mode

  - ### getEndTick

    default BigDecimal getEndTick()
    returns the tick for which the simulation should end.
    Returns:
      the endTick

  - ### setEndTick

    default void setEndTick(BigDecimal endTick)
    Sets the tick at which the simulation should end
    Parameters:
      `endTick` - the endTick to set

  - ### setEndDate

    default void setEndDate(LocalDateTime endDate)
    Sets the date at which the simulation should stop
    Parameters:
      `endDate` - the date at which the simulation should stop