Home | History | Annotate | Download | only in selectors

Lines Matching refs:pattern

40      * The pattern that matches an arbitrary number of directories.
64 * pattern up to the first "**".
67 * can live with false positives. For example, <code>pattern=**\a</code>
70 * @param pattern The pattern to match against. Must not be
76 * pattern up to the first "**".
78 public static boolean matchPatternStart(String pattern, String str) {
79 return matchPatternStart(pattern, str, true);
84 * pattern up to the first "**".
87 * can live with false positives. For example, <code>pattern=**\a</code>
90 * @param pattern The pattern to match against. Must not be
98 * pattern up to the first "**".
100 public static boolean matchPatternStart(String pattern, String str,
102 // When str starts with a File.separator, pattern has to start with a
104 // When pattern starts with a File.separator, str has to start with a
107 != pattern.startsWith(File.separator)) {
111 String[] patDirs = tokenizePathAsArray(pattern);
119 * pattern up to the first "**".
122 * can live with false positives. For example, <code>pattern=**\a</code>
125 * @param patDirs The tokenized pattern to match against. Must not be
133 * pattern up to the first "**".
162 // String not exhausted, but pattern is. Failure.
165 // pattern now holds ** while string is not exhausted
172 * Tests whether or not a given path matches a given pattern.
175 * pattern you should rather use TokenizedPath
179 * @param pattern The pattern to match against. Must not be
184 * @return <code>true</code> if the pattern matches against the string,
187 public static boolean matchPath(String pattern, String str) {
188 String[] patDirs = tokenizePathAsArray(pattern);
193 * Tests whether or not a given path matches a given pattern.
196 * pattern you should rather use TokenizedPattern
200 * @param pattern The pattern to match against. Must not be
207 * @return <code>true</code> if the pattern matches against the string,
210 public static boolean matchPath(String pattern, String str,
212 String[] patDirs = tokenizePathAsArray(pattern);
249 // String not exhausted, but pattern is. Failure.
289 // Find the pattern between padIdxStart & padIdxTmp in str between
326 * Tests whether or not a string matches against a pattern.
327 * The pattern may contain two special characters:<br>
331 * @param pattern The pattern to match against.
333 * @param str The string which must be matched against the pattern.
336 * @return <code>true</code> if the string matches against the pattern,
339 public static boolean match(String pattern, String str) {
340 return match(pattern, str, true);
344 * Tests whether or not a string matches against a pattern.
345 * The pattern may contain two special characters:<br>
349 * @param pattern The pattern to match against.
351 * @param str The string which must be matched against the pattern.
357 * @return <code>true</code> if the string matches against the pattern,
360 public static boolean match(String pattern, String str,
362 char[] patArr = pattern.toCharArray();
381 return false; // Pattern and string do not have the same size
391 return true; // String matches against pattern
395 return true; // Pattern contains only '*', which matches anything
414 // left in the pattern. If so, we succeeded. Otherwise failure.
434 // left in the pattern. If so, we succeeded. Otherwise failure.
438 // process pattern between stars. padIdxStart and patIdxEnd point
453 // Find the pattern between padIdxStart & padIdxTmp in str between
483 // in the pattern. If so, we succeeded. Otherwise failure.