List of usage examples for org.apache.commons.lang3.text StrBuilder contains
public boolean contains(final StrMatcher matcher)
From source file:org.selenium.runner.services.SeleniumRunner.java
protected String injectValue(final String instruction) throws SeleniumRunnerException { if (instruction == null) { throw new SeleniumRunnerException("can't inject value in null instruction !"); }// w w w. j av a 2 s. c o m StrBuilder result = new StrBuilder(instruction); String keyPattern = null; for (String key : storedValues.keySet()) { keyPattern = "${" + key + "}"; if (result.contains(keyPattern)) { result.replaceAll(keyPattern, storedValues.get(key)); } } return result.toString(); }