Package org.kigalisim.engine.recalc
Class RecalcKitBuilder
java.lang.Object
org.kigalisim.engine.support.ValidatedBuilder<RecalcKit>
org.kigalisim.engine.recalc.RecalcKitBuilder
Builder for creating RecalcKit instances.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RecalcKitBuild the RecalcKit.setStateGetter(StateGetter stateGetter) Set the state getter.setStreamKeeper(SimulationState simulationState) Set the simulation state.setUnitConverter(UnitConverter unitConverter) Set the unit converter.protected voidvalidate()Check that all required fields are set before construction.Methods inherited from class org.kigalisim.engine.support.ValidatedBuilder
build, requireField, requireField
-
Constructor Details
-
RecalcKitBuilder
public RecalcKitBuilder()Create a new RecalcKitBuilder.
-
-
Method Details
-
setStreamKeeper
Set the simulation state.- Parameters:
simulationState- The simulation state to set- Returns:
- This builder for chaining
-
setUnitConverter
Set the unit converter.- Parameters:
unitConverter- The unit converter to set- Returns:
- This builder for chaining
-
setStateGetter
Set the state getter.- Parameters:
stateGetter- The state getter to set- Returns:
- This builder for chaining
-
buildInternal
Build the RecalcKit.- Specified by:
buildInternalin classValidatedBuilder<RecalcKit>- Returns:
- A new RecalcKit instance
-
validate
protected void validate()Check that all required fields are set before construction.- Specified by:
validatein classValidatedBuilder<RecalcKit>- Throws:
IllegalStateException- if any required field is missing
-