public final class InterpreterUtils extends Object
| Constructor and Description |
|---|
InterpreterUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <K extends de.uka.ipd.sdq.identifier.Identifier,V> |
createIdentifierMatchingHashMap()
Creates a new
HashMap decorated with an {@link IdentifierMatchingMapDecorator) to
allow to use EMF model elements from potentially different sources as key. |
static <K extends de.uka.ipd.sdq.identifier.Identifier,V> |
createIdentifierMatchingHashMap(int size)
Creates a new
HashMap decorated with an {@link IdentifierMatchingMapDecorator) to
allow to use EMF model elements from potentially different sources as key. |
static Map<org.palladiosimulator.metricspec.MetricDescription,org.palladiosimulator.edp2.datastream.IDataSource> |
determineDataSourcesForAvailableMetrics(Set<org.palladiosimulator.edp2.datastream.IDataSource> dataSources,
Set<ExtendedMeasureProvider> measureProviders) |
static PowerProvidingEntity |
getPowerProvidingEntityFromMeasuringPoint(ResourceSet resourceSet,
org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint)
Gets the
PowerProvidingEntity the given measuring point points to.In the current implementation, only ResourceURIMeasuringPoints are processed as this
is sufficient for all contemporary use cases. |
static org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification |
getProcessingResourceSpecificationFromMeasuringPoint(org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint)
Gets the processing resource specification that is associated with the given measuring point.
|
static Set<org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification> |
getProcessingResourceSpecsFromInfrastructureElement(EObject infModelElement)
Gets all the processing resource specifications that are subsumed by the given model element.
|
static boolean |
isRequiredMetricSatisfiedBy(org.palladiosimulator.metricspec.MetricDescription required,
org.palladiosimulator.metricspec.MetricDescription available)
Helper method that checks whether the required metric (
required) equals the provided
one (available) or is subsumed by it.. |
public static org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification getProcessingResourceSpecificationFromMeasuringPoint(org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint)
measuringPoint - A MeasuringPoint of arbitrary kind.ProcessingResourceSpecification that is associated with the given
measuring point, or null.NullPointerException - In case the given measuring point is null.public static Set<org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification> getProcessingResourceSpecsFromInfrastructureElement(EObject infModelElement)
ProcessingResourceSpecifications is started at the
given element, yielding all specifications that are associated with leafs (e.g,
PowerConsumingEntitys of the corresponding infrastructure model.infModelElement - An EObject representing an element from an infrastructure model.ProcessingResourceSpecifications. If none were found, an empty set is
returned.NullPointerException - A NullPointerException is thrown, if the given argument is null.public static PowerProvidingEntity getPowerProvidingEntityFromMeasuringPoint(ResourceSet resourceSet, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint)
PowerProvidingEntity the given measuring point points to.ResourceURIMeasuringPoints are processed as this
is sufficient for all contemporary use cases. That is, for all other types of measuring
points null is returned.measuringPoint - A reference to a MeasuringPoint model object.PowerProvidingEntity model element the given measuring point is
associated with, null otherwise.IllegalArgumentException - An IllegalArgumentException is thrown, if the given argument is
null.public static boolean isRequiredMetricSatisfiedBy(org.palladiosimulator.metricspec.MetricDescription required,
org.palladiosimulator.metricspec.MetricDescription available)
required) equals the provided
one (available) or is subsumed by it..required - the required metricavailable - the available metricpublic static <K extends de.uka.ipd.sdq.identifier.Identifier,V> Map<K,V> createIdentifierMatchingHashMap()
HashMap decorated with an {@link IdentifierMatchingMapDecorator) to
allow to use EMF model elements from potentially different sources as key.public static <K extends de.uka.ipd.sdq.identifier.Identifier,V> Map<K,V> createIdentifierMatchingHashMap(int size)
HashMap decorated with an {@link IdentifierMatchingMapDecorator) to
allow to use EMF model elements from potentially different sources as key.size - the size of the initial mappublic static Map<org.palladiosimulator.metricspec.MetricDescription,org.palladiosimulator.edp2.datastream.IDataSource> determineDataSourcesForAvailableMetrics(Set<org.palladiosimulator.edp2.datastream.IDataSource> dataSources, Set<ExtendedMeasureProvider> measureProviders)