Class AbstractSystemOfUnits

    • Method Detail

      • getName

        public abstract String getName()
        Specified by:
        getName in interface tech.uom.lib.common.function.Nameable
        Specified by:
        getName in interface SystemOfUnits
      • getUnit

        public Unit<?> getUnit​(String string,
                               UnitStyle style,
                               boolean ignoreCase)
        Returns a unit with the given string representation in a particular style or null if none is found in this unit system and requested style.

        NOTE: Use ignoreCase carefully, as it will find the FIRST unit for a particular string, e.g. the symbol of SECOND and SIEMENS would be the same without case, but the UPPERCASE letter sorted first.

        Parameters:
        string - the string representation of a unit, not null.
        style - the style of unit representation.
        ignoreCase - ignore the case or not?
        Returns:
        the unit with the given string representation.
        Since:
        2.0
      • getUnit

        public Unit<?> getUnit​(String string,
                               UnitStyle style)
        Returns a unit with the given string representation in a particular style or null if none is found in this unit system and requested style.
        Parameters:
        string - the string representation of a unit, not null.
        style - the style of unit representation.
        Returns:
        the unit with the given string representation.
        Since:
        2.0