1 package org.opentrafficsim.core.unit.unitsystem;
2
3 import java.io.Serializable;
4
5 import org.opentrafficsim.core.locale.Localization;
6
7
8
9
10
11
12
13
14
15
16 public abstract class UnitSystem implements Serializable
17 {
18
19 private static final long serialVersionUID = 20140606L;
20
21
22 public static final CGS CGS;
23
24
25 public static final CGS_ESU CGS_ESU;
26
27
28 public static final CGS_EMU CGS_EMU;
29
30
31 public static final Imperial IMPERIAL;
32
33
34 public static final MTS MTS;
35
36
37 public static final Other OTHER;
38
39
40 public static final SIAccepted SI_ACCEPTED;
41
42
43 public static final SIBase SI_BASE;
44
45
46 public static final SIDerived SI_DERIVED;
47
48
49 public static final USCustomary US_CUSTOMARY;
50
51
52 public static final AU AU;
53
54 static
55 {
56 CGS = new CGS("UnitSystem.CGS", "UnitSystem.centimeter-gram-second_system");
57 CGS_ESU = new CGS_ESU("UnitSystem.CGS_(ESU)", "UnitSystem.centimeter-gram-second_system,_electrostatic_units");
58 CGS_EMU = new CGS_EMU("UnitSystem.CGS_(EMU)", "UnitSystem.centimeter-gram-second_system,_electromagnetic_units");
59 IMPERIAL = new Imperial("UnitSystem.Imperial", "UnitSystem.Imperial_system");
60 MTS = new MTS("UnitSystem.MTS", "UnitSystem.meter-tonne-second_system");
61 OTHER = new Other("UnitSystem.Other", "UnitSystem.other_system");
62 SI_ACCEPTED = new SIAccepted("UnitSystem.SI_accepted", "UnitSystem.International_System_of_Units_(Accepted_Unit)");
63 SI_BASE = new SIBase("UnitSystem.SI", "UnitSystem.International_System_of_Units_(Base_Unit)");
64 SI_DERIVED = new SIDerived("UnitSystem.SI_derived", "UnitSystem.International_System_of_Units_(Derived_Unit)");
65 US_CUSTOMARY = new USCustomary("UnitSystem.US_customary", "UnitSystem.US_customary_system");
66 AU = new AU("UnitSystem.AU", "UnitSystem.Atomic_Unit_system");
67 }
68
69
70 private final String abbreviationKey;
71
72
73 private final String nameKey;
74
75
76 private static Localization localization = new Localization("localeunitsystem");
77
78
79
80
81
82 protected UnitSystem(final String abbreviationKey, final String nameKey)
83 {
84 this.abbreviationKey = abbreviationKey;
85 this.nameKey = nameKey;
86 }
87
88
89
90
91 public final String getName()
92 {
93 return localization.getString(this.nameKey);
94 }
95
96
97
98
99 public final String getNameKey()
100 {
101 return this.nameKey;
102 }
103
104
105
106
107 public final String getAbbreviation()
108 {
109 return localization.getString(this.abbreviationKey);
110 }
111
112
113
114
115 public final String getAbbreviationKey()
116 {
117 return this.abbreviationKey;
118 }
119
120 }