code: public LdapQuery filter(String filterFormat, Object... params) {
          Object[] encodedParams = new String[params.length];
  
          for (int i=0; i < params.length; i++) {
              encodedParams[i] = LdapEncoder.filterEncode(params[i].toString());
          }
  
          return filter(MessageFormat.format(filterFormat, encodedParams));
      }
docs: Specify a hardcoded filter using the specified parameters. The parameters will be properly encoded using
  {@link LdapEncoder#filterEncode(String)} to make sure no malicious data gets through. The <code>filterFormat</code>
  String should be formatted for input to {@link MessageFormat#format(String, Object...)}.
  
  @param filterFormat the filter format string, formatted for input to {@link MessageFormat#format(String, Object...)}.
  @param params the parameters that will be used for building the final filter. All parameters will be properly encoded.
  @return this instance.
  @throws IllegalStateException if a filter has already been specified.