code: public void setPattern(NumberPattern pattern, int _maxSigDigits, int _minSigDigits) {
      Format format = pattern.format();
      minIntDigits = orDefault(options.minimumIntegerDigits(), format.minimumIntegerDigits());
  
      maxFracDigits = currencyDigits == -1 ? format.maximumFractionDigits() : currencyDigits;
      maxFracDigits = orDefault(options.maximumFractionDigits(), maxFracDigits);
  
      minFracDigits = currencyDigits == -1 ? format.minimumFractionDigits() : currencyDigits;
      minFracDigits = orDefault(options.minimumFractionDigits(), minFracDigits);
  
      boolean useSignificant = formatMode == SIGNIFICANT || formatMode == SIGNIFICANT_MAXFRAC;
      if (useSignificant) {
          maxSigDigits = orDefault(options.maximumSignificantDigits(), _maxSigDigits);
          minSigDigits = orDefault(options.minimumSignificantDigits(), _minSigDigits);
      } else {
          maxSigDigits = -1;
          minSigDigits = -1;
      }
    }
docs: Set the pattern and initialize parameters based on the arguments, pattern and options settings.