1 package net.sf.mbus4j.dataframes.datablocks.vif;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 public class VifManufacturerSpecific implements Vif {
37
38 public static boolean isManufacturerSecific(String label) {
39 return label.startsWith("Manufacturer specific coding including VIFE's (VIF == 0x");
40 }
41
42 public static VifManufacturerSpecific fromLabel(String label) {
43 if (!isManufacturerSecific(label)) {
44 throw new IllegalArgumentException("label is no man. spec. data !");
45 }
46
47 VifManufacturerSpecific result = new VifManufacturerSpecific();
48 return result;
49 }
50
51
52 public VifManufacturerSpecific() {
53 }
54
55 @Override
56 public Integer getExponent() {
57 return 0;
58 }
59
60 @Override
61 public String getLabel() {
62 return "Manufacturer specific coding (including VIFE's)";
63 }
64
65
66
67
68 @Override
69 public SiPrefix getSiPrefix() {
70 return SiPrefix.ONE;
71 }
72
73 @Override
74 public UnitOfMeasurement getUnitOfMeasurement() {
75 return null;
76 }
77
78 @Override
79 public String toString() {
80 return getLabel();
81 }
82
83 @Override
84 public boolean equals(Object other) {
85 return (other instanceof VifManufacturerSpecific);
86 }
87
88 @Override
89 public VifTypes getVifType() {
90 return VifTypes.MANUFACTURER_SPECIFIC;
91 }
92
93 @Override
94 public int hashCode() {
95 int hash = 5;
96 return hash;
97 }
98 }