Example usage for org.springframework.util AntPathMatcher matchStart

List of usage examples for org.springframework.util AntPathMatcher matchStart

Introduction

In this page you can find the example usage for org.springframework.util AntPathMatcher matchStart.

Prototype

@Override
    public boolean matchStart(String pattern, String path) 

Source Link

Usage

From source file:com.microsoftopentechnologies.windowsazurestorage.WAStorageClient.java

/**
 * Determines whether the path is a potential match to any of the provided
 * patterns/*www .  ja  v a  2 s .  c  om*/
 *
 * @param path
 * @param patterns
 * @return
 */
private static boolean isPotentialMatch(String path, String[] patterns) {
    AntPathMatcher matcher = new AntPathMatcher();
    for (String pattern : patterns) {
        if (matcher.matchStart(pattern, path)) {
            return true;
        }
    }
    return false;
}