Class MeasuringTypeEquivalenceHelper
java.lang.Object
org.palladiosimulator.recorderframework.edp2.MeasuringTypeEquivalenceHelper
A Helper class to check whether two MeasuringTypes are equivalent, that is they describe the same type of measure, that is the same metric and the same place in the system to measure.
This check cannot just be done with MeasuringType.equals(..) as two MeasuringTypes might have a different ids even if they are equivalent, because the ids in SimuCom are created randomly during independent simulation runs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisEquivalent(org.palladiosimulator.edp2.models.ExperimentData.MeasuringType measuringType1, org.palladiosimulator.edp2.models.ExperimentData.MeasuringType measuringType2) Helper method to check equivalence of twoMeasuringType.static booleanisEquivalent(org.palladiosimulator.edp2.models.ExperimentData.MeasuringType measuringType, org.palladiosimulator.metricspec.MetricDescription metricDescription, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) Helper method to check equivalence of two measuring types (i.e.
-
Constructor Details
-
MeasuringTypeEquivalenceHelper
public MeasuringTypeEquivalenceHelper()
-
-
Method Details
-
isEquivalent
public static boolean isEquivalent(org.palladiosimulator.edp2.models.ExperimentData.MeasuringType measuringType1, org.palladiosimulator.edp2.models.ExperimentData.MeasuringType measuringType2) Helper method to check equivalence of twoMeasuringType. See class documentation.- Parameters:
measuringType1- One of theMeasuringTypeto comparemeasuringType2- The otherMeasuringTypeto compare- Returns:
- true if equivalent.
-
isEquivalent
public static boolean isEquivalent(org.palladiosimulator.edp2.models.ExperimentData.MeasuringType measuringType, org.palladiosimulator.metricspec.MetricDescription metricDescription, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) Helper method to check equivalence of two measuring types (i.e. place in system and metric) if the second measuring type is not yet represented by aMeasuringTypeobject.- Parameters:
measuringType-MeasuringTypemetricDescription-MetricDescriptionof the secondMeasuringTypeto compare tomeasuringPoint-MeasuringPointof the secondMeasuringTypeto compare to- Returns:
- true if equivalent.
-