code: protected static UnitFactorSet selectFactorSet(String compact, UnitConverter converter) {
      if (compact != null) {
        switch (compact) {
          case "angle":
          case "angles":
            return UnitFactorSets.ANGLE;
          case "area":
            return converter.areaFactors();
          case "bit":
          case "bits":
            return UnitFactorSets.DIGITAL_BITS;
          case "byte":
          case "bytes":
            return UnitFactorSets.DIGITAL_BYTES;
          case "duration":
            return UnitFactorSets.DURATION;
          case "duration-large":
            return UnitFactorSets.DURATION_LARGE;
          case "duration-small":
            return UnitFactorSets.DURATION_SMALL;
          case "electric":
            return UnitFactorSets.ELECTRIC;
          case "energy":
            return UnitFactorSets.ENERGY;
          case "frequency":
            return UnitFactorSets.FREQUENCY;
          case "length":
            return converter.lengthFactors();
          case "mass":
            return converter.massFactors();
          case "power":
            return UnitFactorSets.POWER;
          case "volume":
            return converter.volumeFactors();
          case "liquid":
            return converter.volumeLiquidFactors();
          default:
            break;
        }
      }
      return null;
    }
docs: Select a factor set based on a name, used to format compact units. For example,
  if compact="bytes" we return a factor set DIGITAL_BYTES. This set is then used
  to produce the most compact form for a given value, e.g. "1.2MB", "37TB", etc.