1 | |
package ca.uhn.hl7v2.hoh.api; |
2 | |
|
3 | |
import java.util.Collections; |
4 | |
import java.util.HashSet; |
5 | |
import java.util.Set; |
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | 175 | public enum MessageMetadataKeys { |
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | 5 | REMOTE_HOST_ADDRESS(String.class), |
21 | |
; |
22 | |
|
23 | |
|
24 | |
private static final Set<String> ourStringKeySetImm; |
25 | |
|
26 | |
static { |
27 | 5 | HashSet<String> stringKeySet = new HashSet<String>(); |
28 | 5 | ourStringKeySetImm = Collections.unmodifiableSet(stringKeySet); |
29 | 10 | for (MessageMetadataKeys next : values()) { |
30 | 5 | stringKeySet.add(next.name()); |
31 | |
} |
32 | 5 | } |
33 | |
|
34 | |
private Class<?> myValueType; |
35 | |
|
36 | 5 | MessageMetadataKeys(Class<?> theValueType) { |
37 | 5 | myValueType = theValueType; |
38 | 5 | } |
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
public Class<?> getValueType() { |
44 | 160 | return myValueType; |
45 | |
} |
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
public static Set<String> keyStringSet() { |
52 | 160 | return ourStringKeySetImm; |
53 | |
} |
54 | |
|
55 | |
} |