code: public static SimpleFormatter compileMinMaxArguments(CharSequence pattern, int min, int max) {
          StringBuilder sb = new StringBuilder();
          String compiledPattern = SimpleFormatterImpl.compileToStringMinMaxArguments(pattern, sb, min, max);
          return new SimpleFormatter(compiledPattern);
      }
docs: Creates a formatter from the pattern string.
  The number of arguments checked against the given limits is the
  highest argument number plus one, not the number of occurrences of arguments.
  
  @param pattern The pattern string.
  @param min The pattern must have at least this many arguments.
  @param max The pattern must have at most this many arguments.
  @return The new SimpleFormatter object.
  @throws IllegalArgumentException for bad argument syntax and too few or too many arguments.
  @hide draft / provisional / internal are hidden on Android