code: protected void addUnit(String pattern, Unit base, String symbol, double factor, boolean metric) {
      Unit unit = base.multiply(factor);
      unitPatterns.put(Pattern.compile("\\b" + NUMBER_REGEX + "\\s{0," + WHITESPACE_LIMIT + "}" + pattern + "\\b"), unit);
      unitSymbols.putIfAbsent(unit, new ArrayList<>());
      unitSymbols.get(unit).add(symbol);
      if (metric && !metricUnits.contains(unit)) {
        metricUnits.add(unit);
      }
    }
docs: Associate a notation with a given unit.
  @param pattern Regex for recognizing the unit. Word boundaries and numbers are added to this pattern by addUnit itself.
  @param base Unit to associate with the pattern
  @param symbol Suffix used for suggestion.
  @param factor Convenience parameter for prefixes for metric units, unit is multiplied with this. Defaults to 1 if not used.
  @param metric Register this notation for suggestion.