Package org.codehaus.plexus.util
Class MatchPatterns
- java.lang.Object
-
- org.codehaus.plexus.util.MatchPatterns
-
public class MatchPatterns extends Object
A list of patterns to be matched- Author:
- Kristian Rosenvold
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MatchPatternsfrom(Iterable<String> strings)static MatchPatternsfrom(String... sources)booleanmatches(String name, boolean isCaseSensitive)Checks these MatchPatterns against a specified string.booleanmatches(String name, char[][] tokenizedNameChar, boolean isCaseSensitive)booleanmatches(String name, String[] tokenizedName, boolean isCaseSensitive)booleanmatchesPatternStart(String name, boolean isCaseSensitive)
-
-
-
Method Detail
-
matches
public boolean matches(String name, boolean isCaseSensitive)
Checks these MatchPatterns against a specified string.
Uses far less string tokenization than any of the alternatives.
- Parameters:
name- The name to look forisCaseSensitive- If the comparison is case sensitive- Returns:
- true if any of the supplied patterns match
-
matches
public boolean matches(String name, char[][] tokenizedNameChar, boolean isCaseSensitive)
-
matchesPatternStart
public boolean matchesPatternStart(String name, boolean isCaseSensitive)
-
from
public static MatchPatterns from(String... sources)
-
from
public static MatchPatterns from(Iterable<String> strings)
-
-