Class ServicingUpdateComponent

java.lang.Object
org.kigalisim.engine.support.ServicingUpdateComponent

public final class ServicingUpdateComponent extends Object
Immutable component holding a servicing volume and its optional state update.

Instances are created by ImplicitRechargeUpdateBuilder.getForRecharge(org.kigalisim.engine.number.EngineNumber) and ImplicitRechargeUpdateBuilder.getForPrecharge(org.kigalisim.engine.number.EngineNumber) to encapsulate one half (either the recharge or precharge half) of an implicit servicing calculation.

  • Constructor Details

    • ServicingUpdateComponent

      public ServicingUpdateComponent(BigDecimal value, Optional<SimulationStateUpdate> update)
      Creates a new ServicingUpdateComponent.
      Parameters:
      value - The BigDecimal amount to add to the stream value for this servicing portion
      update - The optional state update recording this servicing volume in the implicit stream, or empty if no state update is needed
  • Method Details

    • getValue

      public BigDecimal getValue()
      Gets the amount that should be added to the stream value for this servicing portion.
      Returns:
      The servicing volume to add as a BigDecimal
    • getUpdate

      public Optional<SimulationStateUpdate> getUpdate()
      Gets the optional state update recording this servicing volume in the implicit stream.
      Returns:
      Optional state update for the corresponding implicit stream