Class TupleMeasurement

  • All Implemented Interfaces:
    IMeasureProvider, org.palladiosimulator.metricspec.metricentity.IMetricEntity

    public final class TupleMeasurement
    extends MeasuringValue
    Represents a tuple measurement, i.e., a measurement for a {@see MetricSetDescription}.
    • Constructor Detail

      • TupleMeasurement

        public TupleMeasurement​(List<MeasuringValue> subsumedMeasurements,
                                org.palladiosimulator.metricspec.MetricSetDescription metricSetDescription)
        Default constructor.
        Parameters:
        subsumedMeasurements - List of subsumed measurements, needed to construct a measure provider as needed by the super class.
        metricSetDescription - Metric set description of this measurement.
        Throws:
        IllegalArgumentException - If number of measures does not equal number of subsumed metrics.
      • TupleMeasurement

        public TupleMeasurement​(org.palladiosimulator.metricspec.MetricSetDescription metricDescription,
                                javax.measure.Measure<?,​?>... measures)
        Convenience constructor based on subsumed measures.
        Parameters:
        metricDescription - Metric set description of this measurement.
        measures - Subsumed measures.
      • TupleMeasurement

        public TupleMeasurement​(org.palladiosimulator.metricspec.MetricSetDescription metricDescription,
                                List<javax.measure.Measure<?,​?>> measures)
        Convenience constructor based on subsumed measures.
        Parameters:
        metricDescription - Metric set description of this measurement.
        measures - Subsumed measures.
    • Method Detail

      • asList

        public List<javax.measure.Measure<?,​?>> asList()
        Returns the list of measure objects via a Java utils list.
        Returns:
        the list of measure objects.
      • getMeasureForMetric

        public <V,​Q extends javax.measure.quantity.Quantity> javax.measure.Measure<V,​Q> getMeasureForMetric​(org.palladiosimulator.metricspec.MetricDescription wantedMetric)
        Returns a measure object by looking for a given metric conforming to that measure object.
        Type Parameters:
        V - Value type of the measure, e.g., Double.
        Q - 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.
      • getSubsumedMeasurements

        public List<MeasuringValue> getSubsumedMeasurements()
        Returns the list of subsumed measurements.
        Returns:
        the list of subsumed measurements.
      • getMeasuringValueForMetric

        public MeasuringValue getMeasuringValueForMetric​(org.palladiosimulator.metricspec.MetricDescription metricDesciption)
        Returns this measuring value in case it conforms to the given metric description.
        Overrides:
        getMeasuringValueForMetric in class MeasuringValue
        Parameters:
        metricDesciption - the given metric description.
        Returns:
        this measuring value if it conforms to the given metric description, null otherwise.