public boolean checkContains ( String uri , String [ ] patterns ) { for ( String pattern : patterns ) { if ( pattern . length ( ) > 0 ) { if ( uri . contains ( pattern ) ) { return true ; } } } return false ; }
Check whether the URL contains one of the patterns .