1 package org.djunits.unit;
2
3 import org.djunits.unit.quantity.Quantity;
4 import org.djunits.unit.scale.OffsetLinearScale;
5 import org.djunits.unit.si.SIPrefixes;
6 import org.djunits.unit.unitsystem.UnitSystem;
7
8
9
10
11
12
13
14
15
16 public class AbsoluteTemperatureUnit extends AbsoluteLinearUnit<AbsoluteTemperatureUnit, TemperatureUnit>
17 {
18
19 private static final long serialVersionUID = 20140605L;
20
21
22 public static final Quantity<AbsoluteTemperatureUnit> BASE = new Quantity<>("AbsoluteTemperature", "K");
23
24
25 public static final AbsoluteTemperatureUnitsoluteTemperatureUnit">AbsoluteTemperatureUnit KELVIN = new AbsoluteTemperatureUnit()
26 .build(new AbsoluteLinearUnit.Builder<AbsoluteTemperatureUnit, TemperatureUnit>().setQuantity(BASE).setId("K")
27 .setName("Kelvin").setUnitSystem(UnitSystem.SI_BASE).setSiPrefixes(SIPrefixes.UNIT, 1.0)
28 .setRelativeUnit(TemperatureUnit.KELVIN).setScale(new OffsetLinearScale(1.0, 0.0)));
29
30
31 public static final AbsoluteTemperatureUnit DEFAULT = KELVIN;
32
33
34 public static final AbsoluteTemperatureUnit DEGREE_CELSIUS =
35 KELVIN.deriveLinearOffset(1.0, 273.15, TemperatureUnit.DEGREE_CELSIUS, "dgC", "degree Celsius",
36 UnitSystem.SI_DERIVED, "\u00B0C", "degC", new String[] {"C"});
37
38
39 public static final AbsoluteTemperatureUnit DEGREE_FAHRENHEIT =
40 KELVIN.deriveLinearOffset(5.0 / 9.0, 459.67, TemperatureUnit.DEGREE_FAHRENHEIT, "dgF", "degree Fahrenheit",
41 UnitSystem.SI_DERIVED, "\u00B0F", "degF", new String[] {"F"});
42
43
44 public static final AbsoluteTemperatureUnit DEGREE_RANKINE =
45 KELVIN.deriveLinearOffset(5.0 / 9.0, 0.0, TemperatureUnit.DEGREE_RANKINE, "dgR", "degree Rankine",
46 UnitSystem.SI_DERIVED, "\u00B0R", "degR", new String[] {"R"});
47
48
49 public static final AbsoluteTemperatureUnit DEGREE_REAUMUR =
50 KELVIN.deriveLinearOffset(4.0 / 5.0, 273.15, TemperatureUnit.DEGREE_REAUMUR, "dgRe", "degree Reaumur",
51 UnitSystem.SI_DERIVED, "\u00B0R\u00E9", "degRe", new String[] {"Re", "R\u00E9"});
52 }