public boolean match(String requestedURL,Collection<String> patterns,boolean wildcard) throws MalformedURLException {
  boolean result=false;
  String patternLower;
  for (  String pattern : patterns) {
    patternLower=pattern.toLowerCase();
    requestedURL=resourceName.canonicalize(requestedURL);
    if (patternLower.startsWith("http")) {
      pattern=resourceName.canonicalize(pattern);
    }
    if (DEBUG.messageEnabled()) {
      DEBUG.message("URLPatternMatcher.match(" + requestedURL + "): matching by pattern: "+ pattern);
    }
    ResourceMatch res=resourceName.compare(requestedURL,pattern,wildcard);
    if (res == ResourceMatch.WILDCARD_MATCH || res == ResourceMatch.EXACT_MATCH) {
      if (DEBUG.messageEnabled()) {
        DEBUG.message("URLPatternMatcher.match(" + requestedURL + "): matched by pattern: "+ pattern+ " result = "+ res);
      }
      result=true;
      break;
    }
  }
  return result;
}

public boolean match ( String requestedURL , Collection < String > patterns , boolean wildcard ) throws MalformedURLException { boolean result = false ; String patternLower ; for ( String pattern : patterns ) { patternLower = pattern . toLowerCase ( ) ; requestedURL = resourceName . canonicalize ( requestedURL ) ; if ( patternLower . startsWith ( "http" ) ) { pattern = resourceName . canonicalize ( pattern ) ; } if ( DEBUG . messageEnabled ( ) ) { DEBUG . message ( "URLPatternMatcher.match(" + requestedURL + "): matching by pattern: " + pattern ) ; } ResourceMatch res = resourceName . compare ( requestedURL , pattern , wildcard ) ; if ( res == ResourceMatch . WILDCARD_MATCH || res == ResourceMatch . EXACT_MATCH ) { if ( DEBUG . messageEnabled ( ) ) { DEBUG . message ( "URLPatternMatcher.match(" + requestedURL + "): matched by pattern: " + pattern + " result = " + res ) ; } result = true ; break ; } } return result ; }
matches the url against the provided url patterns .
