Class DefaultValueHelper
java.lang.Object
net.ssehub.easy.varModel.confModel.DefaultValueHelper
Assigns the defined default value(s). This class is intended to support
interactive configuration. Otherwise, please rely on the reasoning capabilities.
Instances of this class are intended for reuse, so call
initialize(IDecisionVariable)
before use (alternatively DefaultValueHelper(IDecisionVariable) for creation) and
clear() after use.- Author:
- Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new default value helper.DefaultValueHelper(IDecisionVariable variable) Creates an initialized default value helper by callinginitialize(IDecisionVariable). -
Method Summary
Modifier and TypeMethodDescriptionprivate voidassignCompoundValue(Compound compound) Assigns the default value to a compound.private voidAssigns the default value to a constraint variable.private voidAssigns default value(s) to the given variablevar.private voidAssigns a basic default value based on a single expression.voidclear()Clears this instance for reuse.static voidfillDefaults(IDecisionVariable variable) Fills the value of the givenvariablewith defined default values.private static net.ssehub.easy.basics.logger.EASyLoggerFactory.EASyLoggerReturns the actual logger.voidinitialize(IDecisionVariable variable) Initializes this instance.
-
Field Details
-
evaluator
-
variables
-
-
Constructor Details
-
DefaultValueHelper
public DefaultValueHelper()Creates a new default value helper. Callinitialize(IDecisionVariable). -
DefaultValueHelper
Creates an initialized default value helper by callinginitialize(IDecisionVariable).- Parameters:
variable- the variable to fill with default values
-
-
Method Details
-
fillDefaults
Fills the value of the givenvariablewith defined default values. Currently, evaluation errors are ignored.- Parameters:
variable- the variable to fill
-
initialize
Initializes this instance.- Parameters:
variable- the variable to fill with default values
-
clear
public void clear()Clears this instance for reuse. -
assignDefaultValue
Assigns default value(s) to the given variablevar.- Parameters:
var- the variable to assign the default value(s)
-
assignConstraintValue
private void assignConstraintValue()Assigns the default value to a constraint variable. -
assignCompoundValue
Assigns the default value to a compound.- Parameters:
compound- the compound type
-
assignSingleExpressionDefault
private void assignSingleExpressionDefault()Assigns a basic default value based on a single expression. -
getLogger
private static net.ssehub.easy.basics.logger.EASyLoggerFactory.EASyLogger getLogger()Returns the actual logger.- Returns:
- the logger
-