apache-tomcat-6.0.53-src/engine/src/main/java/org/apache/catalina/valves/RemoteIpValve.java
/**
     * Return <code>true</code> if the given <code>str</code> matches at least one of the given <code>patterns</code>.
     */
Return true if the given str matches at least one of the given patterns.
Return true if the given str matches at least one of the given patterns .
protected static boolean matchesOne(String str, Pattern... patterns) {
        for (Pattern pattern : patterns) {
            if (pattern.matcher(str).matches()) {
                return true;
            }
        }
        return false;
    }
protected static boolean matchesOne ( String str , Pattern ... patterns ) { for ( Pattern pattern : patterns ) { if ( pattern . matcher ( str ) . matches ( ) ) { return true ; } } return false ; }
Return <code>true</code> if the given <code>str</code> matches at least one of the given <code>patterns</code>.
Return <code > true< / code > if the given <code > str< / code > matches at least one of the given <code > patterns< / code > .