View Javadoc
1   package org.djunits.unit;
2   
3   import org.djunits.quantity.Quantity;
4   import org.djunits.unit.scale.IdentityScale;
5   import org.djunits.unit.si.SIPrefixes;
6   import org.djunits.unit.unitsystem.UnitSystem;
7   
8   /**
9    * The units of amount of substance.
10   * <p>
11   * Copyright (c) 2015-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
12   * BSD-style license. See <a href="https://djunits.org/docs/license.html">DJUNITS License</a>.
13   * </p>
14   * version May 15, 2014 <br>
15   * @author <a href="https://www.tudelft.nl/p.knoppers">Peter Knoppers</a>
16   */
17  public class AmountOfSubstanceUnit extends Unit<AmountOfSubstanceUnit>
18  {
19      /** */
20      private static final long serialVersionUID = 20190830;
21  
22      /** The base, with "mol" as the SI signature. */
23      public static final Quantity<AmountOfSubstanceUnit> BASE = new Quantity<>("AmountOfSubstance", "mol");
24  
25      /** The SI unit for amount of substance is mole. */
26      public static final AmountOfSubstanceUnit SI = new AmountOfSubstanceUnit()
27              .build(new Unit.Builder<AmountOfSubstanceUnit>().setQuantity(BASE).setId("mol").setName("mole")
28                      .setUnitSystem(UnitSystem.SI_DERIVED).setSiPrefixes(SIPrefixes.UNIT, 1.0).setScale(IdentityScale.SCALE));
29  
30      /** Mole. */
31      public static final AmountOfSubstanceUnit MOLE = SI;
32  
33      /** mmol. */
34      public static final AmountOfSubstanceUnit MILLIMOLE = MOLE.deriveSI(SIPrefixes.getUnit("m"), 1.0);
35  
36      /** &#181;mol. */
37      public static final AmountOfSubstanceUnit MICROMOLE = MOLE.deriveSI(SIPrefixes.getUnit("mu"), 1.0);
38  
39      /** nmol. */
40      public static final AmountOfSubstanceUnit NANOMOLE = MOLE.deriveSI(SIPrefixes.getUnit("n"), 1.0);
41  }