Package org.kigalisim.engine.support
Class ServicingUpdateComponent
java.lang.Object
org.kigalisim.engine.support.ServicingUpdateComponent
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 Summary
ConstructorsConstructorDescriptionServicingUpdateComponent(BigDecimal value, Optional<SimulationStateUpdate> update) Creates a new ServicingUpdateComponent. -
Method Summary
Modifier and TypeMethodDescriptionGets the optional state update recording this servicing volume in the implicit stream.getValue()Gets the amount that should be added to the stream value for this servicing portion.
-
Constructor Details
-
ServicingUpdateComponent
Creates a new ServicingUpdateComponent.- Parameters:
value- The BigDecimal amount to add to the stream value for this servicing portionupdate- The optional state update recording this servicing volume in the implicit stream, or empty if no state update is needed
-
-
Method Details
-
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
Gets the optional state update recording this servicing volume in the implicit stream.- Returns:
- Optional state update for the corresponding implicit stream
-