Package org.kigalisim.engine.support
Class ChangeExecutorConfigBuilder
java.lang.Object
org.kigalisim.engine.support.ValidatedBuilder<ChangeExecutorConfig>
org.kigalisim.engine.support.ChangeExecutorConfigBuilder
Builder for creating ChangeExecutorConfig instances with fluent interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ChangeExecutorConfigBuilds the ChangeExecutorConfig.setAmount(EngineNumber amount) Sets the change amount.Sets the stream identifier.setUseKeyEffective(UseKey useKeyEffective) Sets the effective use key.setYearMatcher(YearMatcher yearMatcher) Sets the year matcher.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
-
ChangeExecutorConfigBuilder
public ChangeExecutorConfigBuilder()Create a new ChangeExecutorConfigBuilder.
-
-
Method Details
-
setStream
Sets the stream identifier.- Parameters:
stream- the stream identifier to modify- Returns:
- this builder for method chaining
-
setAmount
Sets the change amount.- Parameters:
amount- the change amount (percentage, units, or kg)- Returns:
- this builder for method chaining
-
setYearMatcher
Sets the year matcher.- Parameters:
yearMatcher- matcher to determine if the change applies to current year- Returns:
- this builder for method chaining
-
setUseKeyEffective
Sets the effective use key.- Parameters:
useKeyEffective- the effective UseKey for the operation- Returns:
- this builder for method chaining
-
validate
protected void validate()Check that all required fields are set before construction.- Specified by:
validatein classValidatedBuilder<ChangeExecutorConfig>- Throws:
IllegalStateException- if required fields are not set
-
buildInternal
Builds the ChangeExecutorConfig.- Specified by:
buildInternalin classValidatedBuilder<ChangeExecutorConfig>- Returns:
- the built ChangeExecutorConfig
-