Class VariableContainer

java.lang.Object
net.ssehub.easy.varModel.model.filter.mandatoryVars.VariableContainer

public class VariableContainer extends Object
Stores the Importance to each variable of a configuration.
Author:
El-Sharkawy
  • Field Details

  • Constructor Details

  • Method Details

    • setImportance

      void setImportance(IDecisionVariable variable, Importance importance)
      Changes the importance of the IDecisionVariable.
      Parameters:
      variable - The IDecisionVariable to add.
      importance - The current importance state for the IDecisionVariable.
    • setImportance

      void setImportance(String qName, Importance importance)
      Changes the importance of the IDecisionVariable.
      Parameters:
      qName - The qualified name of a decision variable or a datatype
      importance - The current importance state for the IDecisionVariable.
    • isMandatory

      public boolean isMandatory(IDecisionVariable variable)
      Checks whether the given IDecisionVariable is mandatory.
      Parameters:
      variable - The IDecisionVariable to check.
      Returns:
      true if the user should specify a value. This is only a heuristic value.
    • isMandatory

      public boolean isMandatory(AbstractVariable declaration)
      Checks whether the given AbstractVariable is mandatory. This will also consider if a declaration is multiple times instantiates, e.g., a nested declaration of a compound.
      Parameters:
      declaration - The AbstractVariable to check.
      Returns:
      true if the user should specify a value. This is only a heuristic value.
    • hasMandatoryTypeOrParent

      private boolean hasMandatoryTypeOrParent(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. Part of isMandatory(IDecisionVariable) and isMandatory(AbstractVariable).
      Parameters:
      declaration - The declaration to check.
      Returns:
      true if the user should specify a value. This is only a heuristic value.
    • toString

      public String toString()
      Overrides:
      toString in class Object