1 | package de.uka.ipd.sdq.reliability.solver.pcm2markov; |
2 | |
3 | import de.uka.ipd.sdq.reliability.core.MarkovFailureType; |
4 | |
5 | /** |
6 | * Describes a point of failure in a PCM model. |
7 | * |
8 | * @author brosch |
9 | * |
10 | */ |
11 | public class FailureDescription { |
12 | |
13 | /** |
14 | * The probability of failure. |
15 | */ |
16 | private double failureProbability; |
17 | |
18 | /** |
19 | * The type of failure. |
20 | */ |
21 | private MarkovFailureType failureType; |
22 | |
23 | /** |
24 | * Creates a new FailureDescription. |
25 | * |
26 | * @param type |
27 | * the type of failure |
28 | * @param probability |
29 | * the probability of failure |
30 | */ |
31 | public FailureDescription(final MarkovFailureType type, |
32 | final double probability) { |
33 | this.failureType = type; |
34 | this.failureProbability = probability; |
35 | } |
36 | |
37 | /** |
38 | * Retrieves the probability of failure. |
39 | * |
40 | * @return the probability of failure |
41 | */ |
42 | public final double getFailureProbability() { |
43 | return failureProbability; |
44 | } |
45 | |
46 | /** |
47 | * Retrieves the type of failure. |
48 | * |
49 | * @return the type of failure |
50 | */ |
51 | public final MarkovFailureType getFailureType() { |
52 | return failureType; |
53 | } |
54 | |
55 | /** |
56 | * Overwrites an existing failure probability. |
57 | * |
58 | * @param failureProbability |
59 | */ |
60 | public void setFailureProbability(final double failureProbability) { |
61 | this.failureProbability = failureProbability; |
62 | } |
63 | } |