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

COVERAGE SUMMARY FOR SOURCE FILE [TypesFailureProbabilityAggregation.java]

nameclass, %method, %block, %line, %
TypesFailureProbabilityAggregation.java0%   (0/1)0%   (0/8)0%   (0/48)0%   (0/15)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TypesFailureProbabilityAggregation0%   (0/1)0%   (0/8)0%   (0/48)0%   (0/15)
TypesFailureProbabilityAggregation (FailureAnalysisFailureType, String, doubl... 0%   (0/1)0%   (0/12)0%   (0/5)
addToFailureProbability (double): void 0%   (0/1)0%   (0/7)0%   (0/2)
compareTo (FailureAnalysisFailureType, String): boolean 0%   (0/1)0%   (0/12)0%   (0/1)
getFailureProbability (): double 0%   (0/1)0%   (0/3)0%   (0/1)
getType (): FailureAnalysisFailureType 0%   (0/1)0%   (0/3)0%   (0/1)
getTypeIdentifier (): String 0%   (0/1)0%   (0/3)0%   (0/1)
setType (FailureAnalysisFailureType): void 0%   (0/1)0%   (0/4)0%   (0/2)
setTypeIdentifier (String): void 0%   (0/1)0%   (0/4)0%   (0/2)

1package de.uka.ipd.sdq.reliability.solver.reporting;
2 
3/**
4 * Class used for aggregation of failure probabilities according to a
5 * FailureAnalysisFailureType when considering failure types.
6 * 
7 * @author Daniel Patejdl
8 * 
9 */
10public class TypesFailureProbabilityAggregation {
11        /**
12         * The aggregated failure probability.
13         */
14        private double failureProbability;
15 
16        /**
17         * The failure analysis failure type. The type may be used to distinguish
18         * several instances of this class.
19         */
20        private FailureAnalysisFailureType failureType;
21 
22        /**
23         * An additional string used to distinguish several instances of this class.
24         */
25        private String typeIdentifier;
26 
27        /**
28         * Creates a new instance of this class, given the failure analysis failure
29         * type.
30         * 
31         * @param failureAggregationType
32         *            the failure analysis failure type
33         * @param typeIdentifier
34         *            the type identifier
35         * @param failureProbability
36         *            the failure probability
37         */
38        public TypesFailureProbabilityAggregation(
39                        FailureAnalysisFailureType failureType, String typeIdentifier,
40                        double failureProbability) {
41                this.failureType = failureType;
42                this.typeIdentifier = typeIdentifier;
43                this.failureProbability = failureProbability;
44        }
45 
46        /**
47         * Adds to the current aggregated failure probability additional failure
48         * probability.
49         * 
50         * @param failureProbability
51         *            the failure probability to be added to the existing one
52         */
53        public void addToFailureProbability(double failureProbability) {
54                this.failureProbability += failureProbability;
55        }
56 
57        /**
58         * Compares this instances failure type and type identifier to another
59         * instance's failure type and type identifier.
60         * 
61         * @param otherfailureType
62         *            the other instance's failure type
63         * @param otherTypeIdentifier
64         *            the other instance's type identifier
65         * @return <code>true</code>, if and only if both the failure types and type
66         *         identifiers match
67         */
68        public boolean compareTo(FailureAnalysisFailureType otherfailureType,
69                        String otherTypeIdentifier) {
70                return (failureType == otherfailureType && typeIdentifier == otherTypeIdentifier);
71        }
72 
73        /**
74         * Retrieves the aggregated failure probability.
75         * 
76         * @return the aggregated failure probability
77         */
78        public double getFailureProbability() {
79                return failureProbability;
80        }
81 
82        /**
83         * Returns the failure type.
84         * 
85         * @return the failure type
86         */
87        public FailureAnalysisFailureType getType() {
88                return failureType;
89        }
90 
91        /**
92         * Gets the type identifier.
93         * 
94         * @return the type identifier
95         */
96        public String getTypeIdentifier() {
97                return typeIdentifier;
98        }
99 
100        /**
101         * Sets the failure type.
102         * 
103         * @param failureType
104         *            the failure type
105         */
106        public void setType(FailureAnalysisFailureType failureType) {
107                this.failureType = failureType;
108        }
109 
110        /**
111         * Sets the type identifier
112         * 
113         * @param typeIdentifier
114         *            the type identifier
115         */
116        public void setTypeIdentifier(String typeIdentifier) {
117                this.typeIdentifier = typeIdentifier;
118        }
119}

[all classes][de.uka.ipd.sdq.reliability.solver.reporting]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov