Class Statespace


  • public class Statespace
    extends Object
    Statespace represents the state space spanned by the variation points of the uncertainty variation model
    • Constructor Detail

      • Statespace

        public Statespace​(EObject uncertaintyVariationModel)
        Constructor
        Parameters:
        uncertaintyVariationModel - the uncertainty variation model for this Statespace
        Throws:
        IllegalStateException - if no StateHandlerImplementation can be created for any of the Variation Points
    • Method Detail

      • getModelTypes

        public List<String> getModelTypes()
        returns the names of the model types used by the statehandlers of the various variant points
        Returns:
        list of names of model types which are used by one of the statehandlers
      • iterator

        public StatespaceIterator iterator()
        creates and returns an iterator for traversing this Statespace
        Returns:
        iterator for this Statespace
      • patchModelsWith

        public void patchModelsWith​(Map<String,​List<EObject>> models,
                                    int dimension,
                                    int variationIdx)
        patches the models affected by the dimension with the current variation.
        Parameters:
        models - the models which are used by one of the statehandlers
        dimension - the specific dimension
        variationIdx - the current position in the dimension
      • getValue

        public String getValue​(int dimension,
                               int variationIdx)
        return the value of the dimension corresponding to the variationIdx
        Parameters:
        dimension - the specific dimension
        variationIdx - the current position in the dimension
        Returns:
        the value as string containing either the name with id of the value, the id of value or the variationIdx based on the variation point description
      • getNumberOfDimensions

        public int getNumberOfDimensions()
        returns the dimension (cardinality) of the Statespace
        Returns:
        the number of different Variation Points
      • getDimensions

        public List<String> getDimensions()
        returns dimension as a named list
        Returns:
        list containing the names of the different variation points.
      • getSizeOfDimension

        public int getSizeOfDimension​(int dimension)
        return the size of a specific dimension
        Parameters:
        dimension - the specific dimension
        Returns:
        the number of variations in a specific dimension
        Throws:
        IllegalArgumentException - if the specific dimension is not inside of the dimensions of the statespace