class RegexFilePathMatcher implements FilePathMatcher {

    public boolean isMatch(final String path) {
        if (validator == null || StringUtils.isEmpty(path)) {
            return false;
        }

        if (validator.isValid(path)) {
            return true;
        }

        // If the RegexValidator fails, also check if any of the <code>inputPatterns</code> are the
        // initial substring of the <code>path</code>, in which case we return true because there is
        // a full path match or a directory match.
        for (String inputPattern : inputPatterns) {
            if (path.startsWith(inputPattern)) {
                return true;
            }
        }
        return false;
    }

    public  RegexFilePathMatcher(final String... inputPatterns);

}