Class UnitTest.PerMass.Unit

All Implemented Interfaces:
UnitInterface<UnitTest.PerMass.Unit,UnitTest.PerMass>
Enclosing class:
UnitTest.PerMass

static final class UnitTest.PerMass.Unit extends AbstractUnit<UnitTest.PerMass.Unit,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)
      Construct a PerMass unit with explicit textual/display abbreviations and a provided Scale.
      Parameters:
      textualAbbreviation - String; textual abbreviation / id
      displayAbbreviation - String; display abbreviation
      name - String; full name of the unit
      scale - Scale; scale used to convert to/from BASE (1/kg)
      unitSystem - UnitSystem; system of the unit (typically SI_DERIVED)
  • Method Details