Class UnitSystem

java.lang.Object
org.djunits.unit.system.UnitSystem

public class UnitSystem extends Object
Systems of Units such as SI, including SI-derived; cgs (centimeter-gram-second).

Copyright (c) 2015-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License

Author:
Alexander Verbraeck
  • Field Details

    • CGS

      public static final UnitSystem CGS
      CGS: centimeter-gram-second system.
    • CGS_ESU

      public static final UnitSystem CGS_ESU
      CGS ESU: centimeter-gram-second system, electrostatic units.
    • CGS_EMU

      public static final UnitSystem CGS_EMU
      CGS_EMU: centimeter-gram-second system, electromagnetic units.
    • IMPERIAL

      public static final UnitSystem IMPERIAL
      Imperial system.
    • MTS

      public static final UnitSystem MTS
      MTS: meter-tonne-second system.
    • OTHER

      public static final UnitSystem OTHER
      Other (or no) system.
    • SI_ACCEPTED

      public static final UnitSystem SI_ACCEPTED
      SI units, accepted for use in addition to SI.
    • SI_BASE

      public static final UnitSystem SI_BASE
      SI base units: temperature, time, length, mass, luminous intensity, amount of substance and electric current.
    • SI_DERIVED

      public static final UnitSystem SI_DERIVED
      SI derived units, by combining SI-base elements (and quantifiers such as milli or kilo).
    • US_CUSTOMARY

      public static final UnitSystem US_CUSTOMARY
      US additions to the Imperial system.
    • AU

      public static final UnitSystem AU
      AU: Atomic Unit system.
  • Constructor Details

    • UnitSystem

      public UnitSystem(String id, String name)
      Construct a new UnitSystem.
      Parameters:
      id - the abbreviation of the unit system, such as cgs
      name - the name of the unit system, such as centimeter-gram-second
  • Method Details

    • getName

      public final String getName()
      Retrieve the name of this UnitSystem.
      Returns:
      the name of this UnitSystem, e.g. centimeter-gram-second
    • getId

      public final String getId()
      Retrieve the abbreviation of this UnitSystem.
      Returns:
      the abbreviation of this UnitSystem, e.g., CGS.cgs
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object