public Builder withTokenizer(Class<? extends TokenizerFactory> factory,Map<String,String> params) throws IOException {
  Objects.requireNonNull(factory,"Tokenizer factory may not be null");
  tokenizer.set(applyResourceLoader(newFactoryClassInstance(factory,applyDefaultParams(params))));
  componentsAdded=true;
  return this;
}

public Builder withTokenizer ( Class < ? extends TokenizerFactory > factory , Map < String , String > params ) throws IOException { Objects . requireNonNull ( factory , "Tokenizer factory may not be null" ) ; tokenizer . set ( applyResourceLoader ( newFactoryClassInstance ( factory , applyDefaultParams ( params ) ) ) ) ; componentsAdded = true ; return this ; }
uses the given tokenizer .
