Class VariableContainer


  • public class VariableContainer
    extends java.lang.Object
    Stores the VariableImportance to each variable of a configuration.
    Author:
    El-Sharkawy
    • Field Detail

      • importances

        private java.util.Map<java.lang.String,​Importance> importances
    • Constructor Detail

    • Method Detail

      • setImportance

        void setImportance​(java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object