Package org.kigalisim.engine.support
Class SetExecutor
java.lang.Object
org.kigalisim.engine.support.SetExecutor
Handles set operations for sales streams with proper component distribution.
This class provides methods to handle setting sales values that need to be distributed to component streams (domestic, import) while preserving the lastSpecifiedValue that enables subsequent change operations to work correctly.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleSalesSet(UseKey useKey, String stream, EngineNumber value, Optional<YearMatcher> yearMatcher) Handle sales stream setting by distributing to component streams.voidhandleVirginSet(UseKey useKey, String stream, EngineNumber value, Optional<YearMatcher> yearMatcher) Handle virgin stream setting by distributing to component streams without recycling subtraction.
-
Constructor Details
-
SetExecutor
Creates a new SetExecutor for the given engine.- Parameters:
engine- The Engine instance to operate on
-
-
Method Details
-
handleSalesSet
public void handleSalesSet(UseKey useKey, String stream, EngineNumber value, Optional<YearMatcher> yearMatcher) Handle sales stream setting by distributing to component streams.- Parameters:
useKey- The use key for the operation scopestream- The stream identifier (should be "sales")value- The value to setyearMatcher- Optional year matcher for conditional setting
-
handleVirginSet
public void handleVirginSet(UseKey useKey, String stream, EngineNumber value, Optional<YearMatcher> yearMatcher) Handle virgin stream setting by distributing to component streams without recycling subtraction.Unlike sales which subtracts recycling before distributing, virgin distributes the full amount to domestic and import. This is the key difference: virgin represents only domestic + import (excluding recycling).
- Parameters:
useKey- The use key for the operation scopestream- The stream identifier (should be "virgin")value- The value to setyearMatcher- Optional year matcher for conditional setting
-