madkit.kernel

## Interface Scheduler.SimulationTime

- Enclosing class:
    Scheduler

      public static interface Scheduler.SimulationTime

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DATE_BASED_MODE_REQUIRED`
    `static java.lang.String` | `TICK_BASED_MODE_REQUIRED`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addOneTimeUnit()` Adds one time unit to the simulation current time
    `default java.time.LocalDateTime` | `getCurrentDate()` Gets the current date
    `default java.math.BigDecimal` | `getCurrentTick()` Gets the current tick
    `default java.math.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, java.time.temporal.ChronoUnit unit)` Shortcut for `setCurrentDate(getCurrentDate().plus(amountToAdd, unit));`
    `default void` | `incrementCurrentTick(java.math.BigDecimal delta)` Shortcut for `setCurrentTick(getCurrentTick().add(delta));`
    `default void` | `incrementCurrentTick(double delta)` Shortcut for `setCurrentTick(getCurrentTick().add(BigDecimal.valueOf(delta)));`
    `default void` | `setCurrentDate(java.time.LocalDateTime date)` Shortcut for `setCurrentDate(getCurrentDate().plus(amountToAdd, unit));`
    `default void` | `setCurrentTick(java.math.BigDecimal value)` Sets the current tick a the simulation to the specified value
    `default void` | `setCurrentTick(double value)` Shortcut for `setCurrentTick(BigDdecimal.valuof(value));`
    `default java.time.LocalDateTime` | `setDefaultTemporalUnit(java.time.temporal.ChronoUnit unit)` Sets the default temporal unit which will be used by `addOneTimeUnit()` and `incrementCurrentDate(long)` in a date-based mode
    `default void` | `setEndDate(java.time.LocalDateTime endDate)` Sets the date at which the simulation should stop
    `default void` | `setEndTick(java.math.BigDecimal endTick)` Sets the tick at which the simulation should end

- - ### Field Detail

    - #### TICK_BASED_MODE_REQUIRED

          static final java.lang.String TICK_BASED_MODE_REQUIRED

      See Also:
        Constant Field Values

    - #### DATE_BASED_MODE_REQUIRED

          static final java.lang.String DATE_BASED_MODE_REQUIRED

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### setCurrentTick

          default void setCurrentTick(java.math.BigDecimal value)

      Sets the current tick a the simulation to the specified value
      Parameters:
        `value` -

    - #### setCurrentTick

          default void setCurrentTick(double value)

      Shortcut for `setCurrentTick(BigDdecimal.valuof(value));`
      Parameters:
        `value` - specifies the current tick value

    - #### setCurrentDate

          default void setCurrentDate(java.time.LocalDateTime date)

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

    - #### getCurrentTick

          default java.math.BigDecimal getCurrentTick()

      Gets the current tick
      Returns:
        the current tick of the simulation

    - #### getCurrentDate

          default java.time.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(java.math.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,
                                            java.time.temporal.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 java.time.LocalDateTime setDefaultTemporalUnit(java.time.temporal.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`

    - #### getEndTick

          default java.math.BigDecimal getEndTick()

      returns the tick for which the simulation should end.
      Returns:
        the endTick

    - #### setEndTick

          default void setEndTick(java.math.BigDecimal endTick)

      Sets the tick at which the simulation should end
      Parameters:
        `endTick` - the endTick to set

    - #### setEndDate

          default void setEndDate(java.time.LocalDateTime endDate)

      Sets the date at which the simulation should stop
      Parameters:
        `endDate` - the date at which the simulation should stop

Fabien Michel, Olivier Gutknecht, Jacques Ferber - September 9 2019