Package org.palladiosimulator.pcm.uncertainty.variation.UncertaintyVariationModel.gen.pcm.statespace
Class Statespace
- java.lang.Object
-
- org.palladiosimulator.pcm.uncertainty.variation.UncertaintyVariationModel.gen.pcm.statespace.Statespace
-
public class Statespace extends Object
Statespace represents the state space spanned by the variation points of the uncertainty variation model
-
-
Constructor Summary
Constructors Constructor Description Statespace(EObject uncertaintyVariationModel)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getDimensions()
returns dimension as a named listList<String>
getModelTypes()
returns the names of the model types used by the statehandlers of the various variant pointsint
getNumberOfDimensions()
returns the dimension (cardinality) of the Statespaceint
getSizeOfDimension(int dimension)
return the size of a specific dimensionString
getValue(int dimension, int variationIdx)
return the value of the dimension corresponding to the variationIdxStatespaceIterator
iterator()
creates and returns an iterator for traversing this Statespacevoid
patchModelsWith(Map<String,List<EObject>> models, int dimension, int variationIdx)
patches the models affected by the dimension with the current variation.
-
-
-
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 statehandlersdimension
- the specific dimensionvariationIdx
- 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 dimensionvariationIdx
- 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
-
-