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 Details

    • 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 a Configuration does not imply isNested == true.
      Returns:
      true if it is nested in another decision variable, false else
    • 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 value
      state - the new assignment state
      nested - the nested variable to be considered in the parent
      Throws:
      ConfigurationException - in case of type incompatibilities
    • freeze

      void freeze(IFreezeSelector selector)
      Causes to freeze the current value.
      Parameters:
      selector - determines which parts shall be frozen
    • unfreeze

      void unfreeze(IAssignmentState state)
      Causes to unfreeze the current value.
      Parameters:
      state - the target state for unfreezing (must not be AssignmentState.FROZEN)
    • freeze

      void freeze(String nestedElement)
      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:
      true for created, false else