Interface IModel

  • All Known Implementing Classes:
    Model

    public interface IModel
    Represents a variability model.
    Author:
    Holger Eichelberger
    • Method Detail

      • getName

        java.lang.String getName()
        Returns the name of the model.
        Returns:
        the name of the model
      • getVersion

        java.lang.String getVersion()
        Returns the name of the version.
        Returns:
        the name of the version (may be null)
      • getVariablesCount

        int getVariablesCount()
        Returns the number of decision variables stored in this model.
        Returns:
        the number of decision variables
      • getVariable

        IDecisionVariable getVariable​(int index)
        Returns a particular decision variable.
        Parameters:
        index - the 0-based index of the variable to be returned
        Returns:
        the specified variable
        Throws:
        java.lang.IndexOutOfBoundsException - in case that index<0 || index>={getVariablesCount()}
      • getVariable

        IDecisionVariable getVariable​(java.lang.String name)
                               throws ModelException
        Returns a decision variable by it's (valid IVML) name.
        Parameters:
        name - the name of the variable
        Returns:
        the decision variable (or null if not found)
        Throws:
        ModelException - in case of any semantic problem
      • getTypesCount

        int getTypesCount()
        Returns the number of types known to this model.
        Returns:
        the number of types
      • getType

        java.lang.String getType​(int index)
        Returns a particular known type.
        Parameters:
        index - the 0-based index of the type to be returned
        Returns:
        the specified type
        Throws:
        java.lang.IndexOutOfBoundsException - in case that index<0 || index>={getTypesCount()}
      • createConstraint

        IConstraint createConstraint​(java.lang.String constraint)
                              throws ModelException
        Creates a constraint from the given string. This method does not modify the model.
        Parameters:
        constraint - the string to be turned into a constraint (in IVML notation)
        Returns:
        the constraint
        Throws:
        ModelException - in case of syntactical or semantical problems
      • toString

        java.lang.String toString()
        Returns the textual representation of this model.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the textual representation in IVML syntax