/** * Match the given <code>path</code> against the corresponding part of the given * <code>pattern</code>, according to this PathMatcher's matching strategy. * <p>Determines whether the pattern at least matches as far as the given base * path goes, assuming that a full path may then match as well. * * @param pattern the pattern to match against * @param path the path String to test * @return <code>true</code> if the supplied <code>path</code> matched, * <code>false</code> if it didn't */ public static boolean matchStart(String pattern, String path) { return doMatch(pattern, path, false); }
/** * Does the given <code>path</code> represent a pattern that can be matched * by an implementation of this interface? * <p>If the return value is <code>false</code>, then the {@link #match} * method does not have to be used because direct equality comparisons * on the static path Strings will lead to the same result. * * @param path the path String to check * @return <code>true</code> if the given <code>path</code> represents a pattern */ public static boolean match(String pattern, String path) { return doMatch(pattern, path, true); }
/** * Does the given <code>path</code> represent a pattern that can be matched * by an implementation of this interface? * <p>If the return value is <code>false</code>, then the {@link #match} * method does not have to be used because direct equality comparisons * on the static path Strings will lead to the same result. * * @param path the path String to check * @return <code>true</code> if the given <code>path</code> represents a pattern */ public static boolean match(String pattern, String path) { return doMatch(pattern, path, true); }
/** * Match the given <code>path</code> against the corresponding part of the given * <code>pattern</code>, according to this PathMatcher's matching strategy. * <p>Determines whether the pattern at least matches as far as the given base * path goes, assuming that a full path may then match as well. * * @param pattern the pattern to match against * @param path the path String to test * @return <code>true</code> if the supplied <code>path</code> matched, * <code>false</code> if it didn't */ public static boolean matchStart(String pattern, String path) { return doMatch(pattern, path, false); }