Interface IModel


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

    • getName

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

      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:
      IndexOutOfBoundsException - in case that index<0 || index>={getVariablesCount()}
    • getVariable

      IDecisionVariable getVariable(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

      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:
      IndexOutOfBoundsException - in case that index<0 || index>={getTypesCount()}
    • createConstraint

      IConstraint createConstraint(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

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