1 | package de.uka.ipd.sdq.pipesandfilters.framework; |
2 | |
3 | import javax.measure.unit.Unit; |
4 | |
5 | /** |
6 | * This class holds information about the results that come from one single |
7 | * ProbeSet. |
8 | * |
9 | * @author Baum |
10 | * |
11 | */ |
12 | public class MeasurementMetric { |
13 | |
14 | /** |
15 | * Capture Type value of a measured object |
16 | */ |
17 | private CaptureType captureType; |
18 | /** |
19 | * Specifies whether the measured values are monotonic |
20 | */ |
21 | private boolean isMonotonic; |
22 | /** |
23 | * Specifies whether the measured values are strong monotonic |
24 | */ |
25 | private boolean isStrongMonotonic; |
26 | /** |
27 | * The measurement unit |
28 | */ |
29 | private Unit<?> unit; |
30 | /** |
31 | * The name of the measured object |
32 | */ |
33 | private String name; |
34 | /** |
35 | * A textual description of what is measured |
36 | */ |
37 | private String description; |
38 | /** |
39 | * The scale of the measured object |
40 | */ |
41 | private Scale scale; |
42 | |
43 | /** |
44 | * The constructor of MeasurementMetric, in which all necessary class |
45 | * members are set. |
46 | * |
47 | * @param captureType The capture type of the metric. |
48 | * @param unit The unit of the metric. |
49 | * @param scale The measurement level of the metric. |
50 | */ |
51 | public MeasurementMetric(CaptureType captureType, Unit<?> unit, Scale scale) { |
52 | this.captureType = captureType; |
53 | this.unit = unit; |
54 | this.scale = scale; |
55 | } |
56 | |
57 | /** |
58 | * Returns the capture type. |
59 | * |
60 | * @return The capture type. |
61 | */ |
62 | public CaptureType getCaptureType() { |
63 | return captureType; |
64 | } |
65 | |
66 | /** |
67 | * Returns whether the measured values are monotonic. |
68 | * |
69 | * @return True, if the measured values are monotonic, else false. |
70 | */ |
71 | public boolean isMonotonic() { |
72 | return isMonotonic; |
73 | } |
74 | |
75 | /** |
76 | * Sets whether the measured values are monotonic. |
77 | * |
78 | * @param isMonotonic |
79 | * True, if the measured values are monotonic, else false. |
80 | */ |
81 | public void setMonotonic(boolean isMonotonic) { |
82 | this.isMonotonic = isMonotonic; |
83 | } |
84 | |
85 | /** |
86 | * Returns whether the measured values are strong monotonic. |
87 | * |
88 | * @return True, if the measured values are monotonic, else false. |
89 | */ |
90 | public boolean isStrongMonotonic() { |
91 | return isStrongMonotonic; |
92 | } |
93 | |
94 | /** |
95 | * Sets whether the measured values are strong monotonic. |
96 | * |
97 | * @param isStrongMonotonic |
98 | * True, if the measured values are monotonic, else false. |
99 | */ |
100 | public void setStrongMonotonic(boolean isStrongMonotonic) { |
101 | this.isStrongMonotonic = isStrongMonotonic; |
102 | } |
103 | |
104 | /** |
105 | * Returns the unit of the measured object. |
106 | * |
107 | * @return The Unit of the measured object. |
108 | */ |
109 | public Unit<?> getUnit() { |
110 | return unit; |
111 | } |
112 | |
113 | /** |
114 | * Returns the name of the measured object. |
115 | * |
116 | * @return The name of the measured object. |
117 | */ |
118 | public String getName() { |
119 | return name; |
120 | } |
121 | |
122 | /** |
123 | * Sets the name of the measured object. |
124 | * |
125 | * @param name |
126 | * The name of the measured object. |
127 | */ |
128 | public void setName(String name) { |
129 | this.name = name; |
130 | } |
131 | |
132 | /** |
133 | * Returns a textual description of the measured object. |
134 | * |
135 | * @return A textual description of the measured object. |
136 | */ |
137 | public String getDescription() { |
138 | return description; |
139 | } |
140 | |
141 | /** |
142 | * Sets the textual description of the measured object. |
143 | * |
144 | * @param description |
145 | * The textual description. |
146 | */ |
147 | public void setDescription(String description) { |
148 | this.description = description; |
149 | } |
150 | |
151 | /** |
152 | * Returns the measurement level of the measured object. |
153 | * |
154 | * @return The measurement level of the measured object. |
155 | */ |
156 | public Scale getScale() { |
157 | return scale; |
158 | } |
159 | } |