public boolean matchStart(String pattern, String path) { return doMatch(pattern, path, false, null); }
@Override public boolean matches(String path) { return matcher.match(pattern, path); }
break; if (!matchStrings(patDir, pathDirs[pathIdxStart], uriTemplateVariables)) { return false; break; if (!matchStrings(patDir, pathDirs[pathIdxEnd], uriTemplateVariables)) { return false; String subPat = pattDirs[pattIdxStart + j + 1]; String subStr = pathDirs[pathIdxStart + i + j]; if (!matchStrings(subPat, subStr, uriTemplateVariables)) { continue strLoop;
public boolean match(String pattern, String path) { return doMatch(pattern, path, true, null); }
return pattern1; else if (!pattern1.contains("{") && match(pattern1, pattern2)) { return pattern2;
public Map<String, String> extractUriTemplateVariables(String pattern, String path) { Map<String, String> variables = new LinkedHashMap<String, String>(); boolean result = doMatch(pattern, path, true, variables); Assert.isTrue(result, "Pattern \"" + pattern + "\" is not a match for \"" + path + "\""); return variables; }