/** * Matches using simple regex algorithm. * * * @param basePattern the standard digester path representing the element * @param regexPattern the regex pattern the path will be tested against * @return true if the given pattern matches the given path */ @Override public boolean match(String basePattern, String regexPattern) { // check for nulls if (basePattern == null || regexPattern == null) { return false; } return match(basePattern, regexPattern, 0, 0); }
SimpleRegexMatcher matcher = new SimpleRegexMatcher(); dimensions = dimensions == null ? defaultDimensions : dimensions; if (library == null || matcher.match(lib.getId(), library)) { List<String> urls = lib.getMatching(iconName, dimensions);
/** * Matches using simple regex algorithm. * * * @param basePattern the standard digester path representing the element * @param regexPattern the regex pattern the path will be tested against * @return true if the given pattern matches the given path */ public boolean match(String basePattern, String regexPattern) { // check for nulls if (basePattern == null || regexPattern == null) { return false; } return match(basePattern, regexPattern, 0, 0); }
public String get(String local) { String result = aliasMap.get(local); if (result == null) { for (Entry<String, String> entry : wildcardMap.entrySet()) { String wc = entry.getKey(); if (matcher.match(local, wc)) { result = transformKey(local, wc, entry.getValue()); break; } } } return result; }
public String get(String local) { String result = aliasMap.get(local); if (result == null) { for (Entry<String, String> entry : wildcardMap.entrySet()) { String wc = entry.getKey(); if (matcher.match(local, wc)) { result = transformKey(local, wc, entry.getValue()); break; } } } return result; }