Class CompoundItemConfigProvider
- java.lang.Object
-
- net.ssehub.easy.varModel.confModel.VariableConfigProvider
-
- net.ssehub.easy.varModel.confModel.NestedVarConfigProvider
-
- net.ssehub.easy.varModel.confModel.CompoundItemConfigProvider
-
class CompoundItemConfigProvider extends NestedVarConfigProvider
VariableConfigProviderfor nested Elements of aContainerVariable.- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringslotNameprivate IAssignmentStatestate
-
Constructor Summary
Constructors Modifier Constructor Description protectedCompoundItemConfigProvider(CompoundVariable parent, java.lang.String slotName)Sole constructor for creating aVariableConfigProviderfor nested elements of a compound.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfreeze(IFreezeSelector selector)Causes to freeze the current value.protected AbstractVariablegetDeclaration()Returns the declaration of the relatedIDecisionVariable.protected CompoundVariablegetParent()Returns theStructuredVariablewhich hold the relatedIDecisionVariablewhere this provider belongs to.protected IAssignmentStategetState()Returns the assignment state of this variable.protected ValuegetValue()Returns the current value of thisIDecisionVariable.protected voidsetHistoryValue(Value value, IAssignmentState state)Changes the value from value history.protected voidsetState(IAssignmentState state)Setter for theIAssignmentState, needed byCompoundVariables.protected voidsetValue(Value value, IAssignmentState state)Changes the value (for incremental buildup).-
Methods inherited from class net.ssehub.easy.varModel.confModel.NestedVarConfigProvider
getConfiguration, isStateChangeAllowed
-
Methods inherited from class net.ssehub.easy.varModel.confModel.VariableConfigProvider
freeze, unfreeze
-
-
-
-
Field Detail
-
slotName
private java.lang.String slotName
-
state
private IAssignmentState state
-
-
Constructor Detail
-
CompoundItemConfigProvider
protected CompoundItemConfigProvider(CompoundVariable parent, java.lang.String slotName)
Sole constructor for creating aVariableConfigProviderfor nested elements of a compound.- Parameters:
parent- ACompoundVariablewhich will hold the nestedIDecisionVariablewhere this provider belongs to.slotName- The parent's slotName of the nestedIDecisionVariablewhere this provider belongs to.
-
-
Method Detail
-
getParent
protected CompoundVariable getParent()
Description copied from class:NestedVarConfigProviderReturns theStructuredVariablewhich hold the relatedIDecisionVariablewhere this provider belongs to.- Overrides:
getParentin classNestedVarConfigProvider- Returns:
- The
StructuredVariablewhich hold the relatedIDecisionVariable.
-
getValue
protected Value getValue()
Description copied from class:VariableConfigProviderReturns the current value of thisIDecisionVariable.- Specified by:
getValuein classVariableConfigProvider- Returns:
- the value (may be null)
-
setValue
protected void setValue(Value value, IAssignmentState state) throws ConfigurationException
Description copied from class:VariableConfigProviderChanges the value (for incremental buildup).- Specified by:
setValuein classVariableConfigProvider- Parameters:
value- the value (may be null for incremental buildup)state- the related assignment state- Throws:
ConfigurationException- in case that the types ofVariableConfigProvider.getDeclaration()andvaluedo not comply
-
getState
protected IAssignmentState getState()
Description copied from class:VariableConfigProviderReturns the assignment state of this variable.- Specified by:
getStatein classVariableConfigProvider- Returns:
- the assignment state
-
setState
protected final void setState(IAssignmentState state)
Description copied from class:VariableConfigProviderSetter for theIAssignmentState, needed byCompoundVariables.- Specified by:
setStatein classVariableConfigProvider- Parameters:
state- The newIAssignmentState, which should be set.
-
getDeclaration
protected AbstractVariable getDeclaration()
Description copied from class:VariableConfigProviderReturns the declaration of the relatedIDecisionVariable.- Specified by:
getDeclarationin classVariableConfigProvider- Returns:
IConfigurationElement.getDeclaration().
-
setHistoryValue
protected void setHistoryValue(Value value, IAssignmentState state) throws ConfigurationException
Description copied from class:VariableConfigProviderChanges the value from value history.- Specified by:
setHistoryValuein classVariableConfigProvider- Parameters:
value- the value (may be null for incremental buildup)state- the related assignment state- Throws:
ConfigurationException- in case that the types ofVariableConfigProvider.getDeclaration()andvaluedo not comply
-
freeze
protected void freeze(IFreezeSelector selector)
Description copied from class:VariableConfigProviderCauses to freeze the current value.- Specified by:
freezein classVariableConfigProvider- Parameters:
selector- determines which parts shall be frozen
-
-