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 {@see BaseMetricDescription}.
-
-
Constructor Summary
Constructors Constructor Description BasicMeasurement(javax.measure.Measure<VALUE_TYPE,QUANTITY> measure, org.palladiosimulator.metricspec.BaseMetricDescription metricDescription)
Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<javax.measure.Measure<?,?>>
asList()
Returns the list of measure objects via a Java utils list.javax.measure.Measure<VALUE_TYPE,QUANTITY>
getMeasure()
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 Detail
-
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 Detail
-
getMeasure
public final javax.measure.Measure<VALUE_TYPE,QUANTITY> getMeasure()
Returns the encapsulated measured value in conjunction with its measuredQuantity
.- Returns:
- the measured value and its quantity
- See Also:
Measure
-
asList
public List<javax.measure.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.
-
-