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