Package org.kigalisim.engine.recalc
Class RecalcOperationBuilder
java.lang.Object
org.kigalisim.engine.recalc.RecalcOperationBuilder
Builder for creating RecalcOperation instances with fluent interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the RecalcOperation from the configured strategies.Add consumption recalculation to the operation sequence.Add end-of-life emissions recalculation to the operation sequence.Add population change recalculation to the operation sequence.Add recharge emissions recalculation to the operation sequence.Add retirement recalculation to the operation sequence.Add sales recalculation to the operation sequence.setRecalcKit(RecalcKit recalcKit) Set the RecalcKit containing dependencies for recalculation operations.setScopeEffective(UseKey scope) Set the scope for all recalculation operations.setUseExplicitRecharge(Boolean useExplicitRecharge) Set whether to use explicit recharge in population calculations.Propagate changes to consumption calculation.Propagate changes to end-of-life emissions calculation.Propagate changes to population calculation.Propagate changes to recharge emissions calculation.Propagate changes to retirement calculation.Propagate changes to sales calculation.
-
Constructor Details
-
RecalcOperationBuilder
public RecalcOperationBuilder()Create a new RecalcOperationBuilder.
-
-
Method Details
-
setScopeEffective
Set the scope for all recalculation operations.- Parameters:
scope- The scope to use for calculations- Returns:
- This builder for method chaining
-
setUseExplicitRecharge
Set whether to use explicit recharge in population calculations.- Parameters:
useExplicitRecharge- Whether to use explicit recharge- Returns:
- This builder for method chaining
-
setRecalcKit
Set the RecalcKit containing dependencies for recalculation operations.- Parameters:
recalcKit- The recalc kit to use- Returns:
- This builder for method chaining
-
recalcPopulationChange
Add population change recalculation to the operation sequence.- Returns:
- This builder for method chaining
-
recalcConsumption
Add consumption recalculation to the operation sequence.- Returns:
- This builder for method chaining
-
recalcSales
Add sales recalculation to the operation sequence.- Returns:
- This builder for method chaining
-
recalcRechargeEmissions
Add recharge emissions recalculation to the operation sequence.- Returns:
- This builder for method chaining
-
recalcEolEmissions
Add end-of-life emissions recalculation to the operation sequence.- Returns:
- This builder for method chaining
-
recalcRetire
Add retirement recalculation to the operation sequence.- Returns:
- This builder for method chaining
-
thenPropagateToPopulationChange
Propagate changes to population calculation.- Returns:
- This builder for method chaining
-
thenPropagateToConsumption
Propagate changes to consumption calculation.- Returns:
- This builder for method chaining
-
thenPropagateToSales
Propagate changes to sales calculation.- Returns:
- This builder for method chaining
-
thenPropagateToRechargeEmissions
Propagate changes to recharge emissions calculation.- Returns:
- This builder for method chaining
-
thenPropagateToEolEmissions
Propagate changes to end-of-life emissions calculation.- Returns:
- This builder for method chaining
-
thenPropagateToRetire
Propagate changes to retirement calculation.- Returns:
- This builder for method chaining
-
build
Build the RecalcOperation from the configured strategies.- Returns:
- A RecalcOperation containing all configured strategies
- Throws:
IllegalStateException- if no strategies have been configured or RecalcKit not provided
-