Class BasicMeasurement<VALUE_TYPE,QUANTITY extends javax.measure.quantity.Quantity>
java.lang.Object
org.palladiosimulator.measurementframework.MeasuringValue
org.palladiosimulator.measurementframework.BasicMeasurement<VALUE_TYPE,QUANTITY>
- Type Parameters:
VALUE_TYPE
- denotes the class of the taken sample (Integer, Long, ...)QUANTITY
- denotes the measuredQuantity
- All Implemented Interfaces:
IMeasureProvider
,org.palladiosimulator.metricspec.metricentity.IMetricEntity
public final class BasicMeasurement<VALUE_TYPE,QUANTITY extends javax.measure.quantity.Quantity>
extends MeasuringValue
Represents a basic measurement, i.e., a measurement for a .
-
Constructor Summary
ConstructorDescriptionBasicMeasurement
(javax.measure.Measure<VALUE_TYPE, QUANTITY> measure, org.palladiosimulator.metricspec.BaseMetricDescription metricDescription) Default Constructor. -
Method Summary
Modifier and TypeMethodDescriptionList<javax.measure.Measure<?,
?>> asList()
Returns the list of measure objects via a Java utils list.final javax.measure.Measure<VALUE_TYPE,
QUANTITY> Returns the encapsulated measured value in conjunction with its measuredQuantity
.<S,
T extends javax.measure.quantity.Quantity>
javax.measure.Measure<S,T> getMeasureForMetric
(org.palladiosimulator.metricspec.MetricDescription wantedMetric) Returns a measure object by looking for a given metric conforming to that measure object.Methods inherited from class org.palladiosimulator.measurementframework.MeasuringValue
asArray, getMeasuringValueForMetric, getMetricDesciption, isCompatibleWith
-
Constructor Details
-
BasicMeasurement
public BasicMeasurement(javax.measure.Measure<VALUE_TYPE, QUANTITY> measure, org.palladiosimulator.metricspec.BaseMetricDescription metricDescription) Default Constructor.- Parameters:
measure
- The measure to be represented.metricDescription
- The base metric to be represented.
-
-
Method Details
-
getMeasure
Returns the encapsulated measured value in conjunction with its measuredQuantity
.- Returns:
- the measured value and its quantity
- See Also:
-
Measure
-
asList
Description copied from interface:IMeasureProvider
Returns the list of measure objects via a Java utils list.- Returns:
- the list of measure objects.
-
getMeasureForMetric
public <S,T extends javax.measure.quantity.Quantity> javax.measure.Measure<S,T> getMeasureForMetric(org.palladiosimulator.metricspec.MetricDescription wantedMetric) Returns a measure object by looking for a given metric conforming to that measure object.- Type Parameters:
S
- Value type of the measure, e.g., Double.T
- Quantity of the measure, e.g., 2.0 seconds.- Parameters:
wantedMetric
- The metric to look for.- Returns:
- A measure object conforming to the given metric.
-