Package org.kigalisim.engine.support
Class ChangeExecutorConfig
java.lang.Object
org.kigalisim.engine.support.ChangeExecutorConfig
Configuration for change executor operations.
This immutable class encapsulates all parameters needed for executing change operations on engine streams.
-
Constructor Summary
ConstructorsConstructorDescriptionChangeExecutorConfig(String stream, EngineNumber amount, Optional<YearMatcher> yearMatcher, UseKey useKeyEffective) Creates a new ChangeExecutorConfig.ChangeExecutorConfig(String stream, EngineNumber amount, UseKey useKeyEffective) Creates a new ChangeExecutorConfig without a year matcher.ChangeExecutorConfig(String stream, EngineNumber amount, YearMatcher yearMatcher, UseKey useKeyEffective) Creates a new ChangeExecutorConfig with a YearMatcher. -
Method Summary
Modifier and TypeMethodDescriptionGets the change amount.Gets the stream identifier.Gets the effective use key.Gets the year matcher.
-
Constructor Details
-
ChangeExecutorConfig
public ChangeExecutorConfig(String stream, EngineNumber amount, Optional<YearMatcher> yearMatcher, UseKey useKeyEffective) Creates a new ChangeExecutorConfig.- Parameters:
stream- The stream identifier to modifyamount- The change amount (percentage, units, or kg)yearMatcher- Optional matcher to determine if the change applies to current yearuseKeyEffective- The effective UseKey for the operation
-
ChangeExecutorConfig
public ChangeExecutorConfig(String stream, EngineNumber amount, YearMatcher yearMatcher, UseKey useKeyEffective) Creates a new ChangeExecutorConfig with a YearMatcher.- Parameters:
stream- The stream identifier to modifyamount- The change amount (percentage, units, or kg)yearMatcher- Matcher to determine if the change applies to current yearuseKeyEffective- The effective UseKey for the operation
-
ChangeExecutorConfig
Creates a new ChangeExecutorConfig without a year matcher.This configuration will apply to all years since no year matching is specified.
- Parameters:
stream- The stream identifier to modifyamount- The change amount (percentage, units, or kg)useKeyEffective- The effective UseKey for the operation
-
-
Method Details
-
getStream
Gets the stream identifier.- Returns:
- the stream identifier
-
getAmount
Gets the change amount.- Returns:
- the change amount
-
getYearMatcher
Gets the year matcher.- Returns:
- the year matcher wrapped in Optional, or Optional.empty() if not specified
-
getUseKeyEffective
Gets the effective use key.- Returns:
- the effective use key
-