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

COVERAGE SUMMARY FOR SOURCE FILE [ContinuousSampleImpl.java]

nameclass, %method, %block, %line, %
ContinuousSampleImpl.java100% (1/1)83%  (5/6)84%  (42/50)79%  (12,6/16)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ContinuousSampleImpl100% (1/1)83%  (5/6)84%  (42/50)79%  (12,6/16)
setValue (Double): void 0%   (0/1)0%   (0/4)0%   (0/2)
equals (Object): boolean 100% (1/1)85%  (22/26)77%  (4,6/6)
ContinuousSampleImpl (Double, Double): void 100% (1/1)100% (9/9)100% (4/4)
getProbability (): Double 100% (1/1)100% (3/3)100% (1/1)
getValue (): double 100% (1/1)100% (4/4)100% (1/1)
setProbability (Double): void 100% (1/1)100% (4/4)100% (2/2)

1/**
2 * 
3 */
4package de.uka.ipd.sdq.probfunction.math.impl;
5 
6import de.uka.ipd.sdq.probfunction.math.IContinuousSample;
7import de.uka.ipd.sdq.probfunction.math.util.MathTools;
8 
9/**
10 * @author Ihssane
11 * 
12 */
13public class ContinuousSampleImpl implements IContinuousSample {
14 
15        private Double value;
16        private Double probability;
17        /**
18         * @param value
19         * @param probability
20         */
21        protected ContinuousSampleImpl(Double value, Double probability) {
22                this.value = value;
23                this.probability = probability;
24        }
25        /*
26         * (non-Javadoc)
27         * 
28         * @see de.uka.ipd.sdq.math.probfunction.impl.IContinuousSampel#getProbability()
29         */
30        public Double getProbability() {
31                return probability;
32        }
33        /*
34         * (non-Javadoc)
35         * 
36         * @see de.uka.ipd.sdq.math.probfunction.impl.IContinuousSampel#setProbability(java.lang.Double)
37         */
38        public void setProbability(Double probability) {
39                this.probability = probability;
40        }
41        /*
42         * (non-Javadoc)
43         * 
44         * @see de.uka.ipd.sdq.math.probfunction.impl.IContinuousSampel#getValue()
45         */
46        public double getValue() {
47                return value;
48        }
49        /*
50         * (non-Javadoc)
51         * 
52         * @see de.uka.ipd.sdq.math.probfunction.impl.IContinuousSampel#setValue(java.lang.Double)
53         */
54        public void setValue(Double value) {
55                this.value = value;
56        }
57        /**
58         * 
59         */
60        @Override
61        public boolean equals(Object obj) {
62                if (obj instanceof IContinuousSample) {
63                        IContinuousSample s = (IContinuousSample) obj;
64                        return MathTools.equalsDouble(this.getValue(), s.getValue())
65                                        && MathTools.equalsDouble(this.getProbability(), s
66                                                        .getProbability());
67                }
68                return false;
69        }
70 
71}

[all classes][de.uka.ipd.sdq.probfunction.math.impl]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov