public static ResourcePredicate<Resource> patternFilter(Pattern pattern) {
        return (r) -> pattern.matcher(r.getPath()).matches();
    }
public static ResourcePredicate < Resource > patternFilter ( Pattern pattern ) { return ( r ) -> pattern . matcher ( r . getPath ( ) ) . matches ( ) ; }
@param pattern A Pattern to match against the resource path
@return true if the resource path matches the specified pattern.