Class VariableContainer
java.lang.Object
net.ssehub.easy.varModel.model.filter.mandatoryVars.VariableContainer
Stores the
Importance to each variable of a configuration.- Author:
- El-Sharkawy
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVariableContainer(Configuration config, MandatoryClassifierSettings settings) Single constructor for this class, initializes all variables in stateImportance.UNCLAER. -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanhasMandatoryTypeOrParent(AbstractVariable declaration) Checks whether the given declaration is mandatory because of its type, or while the parent specifies that all nested elements shall be mandatory.booleanisMandatory(IDecisionVariable variable) Checks whether the givenIDecisionVariableis mandatory.booleanisMandatory(AbstractVariable declaration) Checks whether the givenAbstractVariableis mandatory.(package private) voidsetImportance(String qName, Importance importance) Changes the importance of theIDecisionVariable.(package private) voidsetImportance(IDecisionVariable variable, Importance importance) Changes the importance of theIDecisionVariable.toString()
-
Field Details
-
importances
-
-
Constructor Details
-
VariableContainer
VariableContainer(Configuration config, MandatoryClassifierSettings settings) Single constructor for this class, initializes all variables in stateImportance.UNCLAER.- Parameters:
config- TheConfiguration, for which the states are calculated.settings- Specification whether default values should be threaten as not mandatory.
-
-
Method Details
-
setImportance
Changes the importance of theIDecisionVariable.- Parameters:
variable- TheIDecisionVariableto add.importance- The current importance state for theIDecisionVariable.
-
setImportance
Changes the importance of theIDecisionVariable.- Parameters:
qName- The qualified name of a decision variable or a datatypeimportance- The current importance state for theIDecisionVariable.
-
isMandatory
Checks whether the givenIDecisionVariableis mandatory.- Parameters:
variable- TheIDecisionVariableto check.- Returns:
trueif the user should specify a value. This is only a heuristic value.
-
isMandatory
Checks whether the givenAbstractVariableis mandatory. This will also consider if a declaration is multiple times instantiates, e.g., a nested declaration of a compound.- Parameters:
declaration- TheAbstractVariableto check.- Returns:
trueif the user should specify a value. This is only a heuristic value.
-
hasMandatoryTypeOrParent
Checks whether the given declaration is mandatory because of its type, or while the parent specifies that all nested elements shall be mandatory. Part ofisMandatory(IDecisionVariable)andisMandatory(AbstractVariable).- Parameters:
declaration- The declaration to check.- Returns:
trueif the user should specify a value. This is only a heuristic value.
-
toString
-