Class UnitTest.PerMass.Unit

java.lang.Object
org.djunits.unit.AbstractUnit<UnitTest.PerMass>
org.djunits.unit.UnitTest.PerMass.Unit
All Implemented Interfaces:
UnitInterface<UnitTest.PerMass>
Enclosing class:
UnitTest.PerMass

static final class UnitTest.PerMass.Unit extends AbstractUnit<UnitTest.PerMass>
Unit for UnitTest.PerMass (SI dimension: 1/kg). The base textual/display abbreviation is "/kg", and the base name is "per kilogram" so that AbstractUnit.generateSiPrefixes(boolean, boolean) with kilo=true, perUnit=true passes the guards and uses SIPrefixes.PER_KILO_PREFIXES.
  • Field Details

  • Constructor Details

    • Unit

      Unit(String id, String name, double scaleFactorToBaseUnit, UnitSystem unitSystem)
      Construct a PerMass unit with an explicit (linear) scale factor to BASE (1/kg).
      Parameters:
      id - String; textual abbreviation / id (e.g., "/kg", "/g")
      name - String; full name (e.g., "per kilogram", "per gram")
      scaleFactorToBaseUnit - double; numeric factor to convert to 1/kg
      unitSystem - UnitSystem; system of the unit (typically SI_DERIVED)
    • Unit

      Unit(String textualAbbreviation, String displayAbbreviation, String name, Scale scale, UnitSystem unitSystem, SIPrefix siPrefix)
      Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
      Parameters:
      textualAbbreviation - the textual abbreviation of the unit, which doubles as the id
      displayAbbreviation - the display abbreviation of the unit
      name - the full name of the unit
      scale - the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
      unitSystem - unit system, e.g. SI or Imperial
      siPrefix - the SI Prefix of this unit
  • Method Details