Interface IConfigurationElement
- All Known Subinterfaces:
IDecisionVariable
- All Known Implementing Classes:
BasisVariable,CompoundVariable,Configuration,ContainerVariable,DecisionVariable,LocalDecisionVariable,SequenceVariable,SetVariable,StructuredVariable
public interface IConfigurationElement
Defines the interface for elements in a configuration (including the
configuration itself).
- Author:
- Holger Eichelberger
-
Method Summary
Modifier and TypeMethodDescriptionvoidCauses to freeze a nested value.voidfreeze(IFreezeSelector selector) Causes to freeze the current value.Returns the topLevel parent.Returns the declaration of the variable.Returns the element this element is part of.getState()Returns the assignment state of this variable.booleanisNested()Returns whether this decision variable is nested.voidsetValue(Value value, IAssignmentState state, IConfigurationElement nested) Changes the value of a nested variable.voidunfreeze(IAssignmentState state) Causes to unfreeze the current value.booleanReturns whether the variable value was explicitly created.
-
Method Details
-
getParent
IConfigurationElement getParent()Returns the element this element is part of.- Returns:
- the parent element (may be null in case of the top-level configuration)
-
getConfiguration
Configuration getConfiguration()Returns the topLevel parent.- Returns:
- should be the configuration
-
isNested
boolean isNested()Returns whether this decision variable is nested. Being member of aConfigurationdoes not imply.isNested== true- Returns:
trueif it is nested in another decision variable,falseelse
-
getState
IAssignmentState getState()Returns the assignment state of this variable.- Returns:
- the assignment state
-
setValue
void setValue(Value value, IAssignmentState state, IConfigurationElement nested) throws ConfigurationException Changes the value of a nested variable.- Parameters:
value- the new valuestate- the new assignment statenested- the nested variable to be considered in the parent- Throws:
ConfigurationException- in case of type incompatibilities
-
freeze
Causes to freeze the current value.- Parameters:
selector- determines which parts shall be frozen
-
unfreeze
Causes to unfreeze the current value.- Parameters:
state- the target state for unfreezing (must not beAssignmentState.FROZEN)
-
freeze
Causes to freeze a nested value.- Parameters:
nestedElement- The name of the nested Element, which should be frozen.
-
getDeclaration
AbstractVariable getDeclaration()Returns the declaration of the variable.- Returns:
- the declaration of the decision variable
-
wasCreated
boolean wasCreated()Returns whether the variable value was explicitly created.- Returns:
truefor created,falseelse
-