EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.probespec.framework.calculator]

COVERAGE SUMMARY FOR SOURCE FILE [UnaryCalculator.java]

nameclass, %method, %block, %line, %
UnaryCalculator.java0%   (0/1)0%   (0/2)0%   (0/33)0%   (0/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class UnaryCalculator0%   (0/1)0%   (0/2)0%   (0/33)0%   (0/8)
UnaryCalculator (ProbeSpecContext, Integer): void 0%   (0/1)0%   (0/17)0%   (0/4)
execute (ProbeSetSample): BlackboardVote 0%   (0/1)0%   (0/16)0%   (0/4)

1package de.uka.ipd.sdq.probespec.framework.calculator;
2 
3import java.util.Vector;
4 
5import javax.measure.Measure;
6import javax.measure.quantity.Quantity;
7 
8import de.uka.ipd.sdq.pipesandfilters.framework.MeasurementMetric;
9import de.uka.ipd.sdq.probespec.framework.BlackboardVote;
10import de.uka.ipd.sdq.probespec.framework.ProbeSetSample;
11import de.uka.ipd.sdq.probespec.framework.ProbeSpecContext;
12import de.uka.ipd.sdq.probespec.framework.exceptions.CalculatorException;
13 
14public abstract class UnaryCalculator extends Calculator {
15 
16        private Integer probeSetID;
17        
18    protected UnaryCalculator(ProbeSpecContext ctx, Integer probeSetID) {
19        super(ctx);
20        this.probeSetID = probeSetID;
21     
22        ctx.getSampleBlackboard().addBlackboardListener(this, probeSetID);
23    }
24        
25        abstract protected Vector<Measure<?, ? extends Quantity>> calculate(
26                        ProbeSetSample sample)
27                        throws CalculatorException;
28        
29        @Override
30        abstract protected Vector<MeasurementMetric> getConcreteMeasurementMetrics();
31 
32        @Override
33        protected BlackboardVote execute(ProbeSetSample pss) throws CalculatorException {
34                if (probeSetID.equals(pss.getProbeSetAndRequestContext().getProbeSetID())) {
35                        Vector<Measure<?, ? extends Quantity>> resultTuple = calculate(pss);
36                        fireCalculated(resultTuple);
37                }
38                return BlackboardVote.DISCARD;
39        }
40 
41}

[all classes][de.uka.ipd.sdq.probespec.framework.calculator]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov