1
2
3
4
5
6
7
8 package org.sourceforge.mbeanmonitoring.report.castor.types;
9
10
11
12
13
14 import java.util.Hashtable;
15
16
17
18
19
20
21 public class MethodStatNameType implements java.io.Serializable {
22
23
24
25
26
27
28
29
30
31 public static final int COUNT_TYPE = 0;
32
33
34
35
36 public static final MethodStatNameType COUNT = new MethodStatNameType(COUNT_TYPE, "Count");
37
38
39
40
41 public static final int MIN_TIME_TYPE = 1;
42
43
44
45
46 public static final MethodStatNameType MIN_TIME = new MethodStatNameType(MIN_TIME_TYPE, "Min.Time");
47
48
49
50
51 public static final int MOY_TIME_TYPE = 2;
52
53
54
55
56 public static final MethodStatNameType MOY_TIME = new MethodStatNameType(MOY_TIME_TYPE, "Moy.Time");
57
58
59
60
61 public static final int MAX_TIME_TYPE = 3;
62
63
64
65
66 public static final MethodStatNameType MAX_TIME = new MethodStatNameType(MAX_TIME_TYPE, "Max.Time");
67
68
69
70
71 public static final int TOTAL_TIME_TYPE = 4;
72
73
74
75
76 public static final MethodStatNameType TOTAL_TIME = new MethodStatNameType(TOTAL_TIME_TYPE, "Total.Time");
77
78
79
80
81 public static final int LOW_TYPE = 5;
82
83
84
85
86 public static final MethodStatNameType LOW = new MethodStatNameType(LOW_TYPE, "low");
87
88
89
90
91 public static final int HIGH_TYPE = 6;
92
93
94
95
96 public static final MethodStatNameType HIGH = new MethodStatNameType(HIGH_TYPE, "high");
97
98
99
100
101 public static final int CURRENT_TYPE = 7;
102
103
104
105
106 public static final MethodStatNameType CURRENT = new MethodStatNameType(CURRENT_TYPE, "current");
107
108
109
110
111 private static java.util.Hashtable _memberTable = init();
112
113
114
115
116 private final int type;
117
118
119
120
121 private java.lang.String stringValue = null;
122
123
124
125
126
127
128 private MethodStatNameType(final int type, final java.lang.String value) {
129 super();
130 this.type = type;
131 this.stringValue = value;
132 }
133
134
135
136
137
138
139
140
141
142
143
144
145
146 public static java.util.Enumeration enumerate(
147 ) {
148 return _memberTable.elements();
149 }
150
151
152
153
154
155
156 public int getType(
157 ) {
158 return this.type;
159 }
160
161
162
163
164
165
166 private static java.util.Hashtable init(
167 ) {
168 Hashtable members = new Hashtable();
169 members.put("Count", COUNT);
170 members.put("Min.Time", MIN_TIME);
171 members.put("Moy.Time", MOY_TIME);
172 members.put("Max.Time", MAX_TIME);
173 members.put("Total.Time", TOTAL_TIME);
174 members.put("low", LOW);
175 members.put("high", HIGH);
176 members.put("current", CURRENT);
177 return members;
178 }
179
180
181
182
183
184
185
186
187 private java.lang.Object readResolve(
188 ) {
189 return valueOf(this.stringValue);
190 }
191
192
193
194
195
196
197
198 public java.lang.String toString(
199 ) {
200 return this.stringValue;
201 }
202
203
204
205
206
207
208
209
210 public static org.sourceforge.mbeanmonitoring.report.castor.types.MethodStatNameType valueOf(
211 final java.lang.String string) {
212 java.lang.Object obj = null;
213 if (string != null) {
214 obj = _memberTable.get(string);
215 }
216 if (obj == null) {
217 String err = "" + string + " is not a valid MethodStatNameType";
218 throw new IllegalArgumentException(err);
219 }
220 return (MethodStatNameType) obj;
221 }
222
223 }