1 package org.opentrafficsim.core.unit;
2
3 import org.opentrafficsim.core.unit.unitsystem.UnitSystem;
4
5 /**
6 * Helper class to create arbitrary SI units.
7 * <p>
8 * Copyright (c) 2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
9 * BSD-style license. See <a href="http://opentrafficsim.org/node/13">OpenTrafficSim License</a>.
10 * <p>
11 * @version Jun 15, 2014 <br>
12 * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
13 */
14 public class SIUnit extends Unit<SIUnit>
15 {
16 /** */
17 private static final long serialVersionUID = 20140615L;
18
19 /**
20 * Create an arbitrary SI unit based on a coefficient string, such as m3/cd2.
21 * @param siCoefficientString String; textual description of the unit.
22 */
23 public SIUnit(final String siCoefficientString)
24 {
25 super(siCoefficientString, siCoefficientString, UnitSystem.SI_DERIVED, true);
26 }
27
28 /** {@inheritDoc} */
29 @Override
30 public final SIUnit getStandardUnit()
31 {
32 return this;
33 }
34
35 /** {@inheritDoc} */
36 @Override
37 public final String getSICoefficientsString()
38 {
39 return this.getAbbreviationKey().replace("SIUnit.", "");
40 }
41
42 }