View Javadoc
1   package org.djunits.unit;
2   
3   import org.djunits.unit.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    * Dimensionless unit.
10   * <p>
11   * Copyright (c) 2015-2023 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   * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a>
15   */
16  public final class DimensionlessUnit extends Unit<DimensionlessUnit>
17  {
18      /** */
19      private static final long serialVersionUID = 20150830L;
20  
21      /** The base, with the empty SI signature. */
22      public static final Quantity<DimensionlessUnit> BASE = new Quantity<>("Dimensionless", "");
23  
24      /** The SI unit for a dimension less unit is "1" or N/A. */
25      public static final DimensionlessUnit SI =
26              new DimensionlessUnit().build(new Unit.Builder<DimensionlessUnit>().setQuantity(BASE).setId("unit").setName("unit")
27                      .setUnitSystem(UnitSystem.OTHER).setSiPrefixes(SIPrefixes.NONE, 1.0).setScale(IdentityScale.SCALE));
28  
29  }