public abstract class PatternMatchUtils extends Object
Constructor and Description |
---|
PatternMatchUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
simpleMatch(String[] patterns,
String str)
Match a String against the given patterns, supporting the following simple
pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an
arbitrary number of pattern parts), as well as direct equality.
|
static boolean |
simpleMatch(String pattern,
String str)
Match a String against the given pattern, supporting the following simple
pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an
arbitrary number of pattern parts), as well as direct equality.
|
static boolean |
simpleMatchIgnoreCase(String[] patterns,
String str)
Variant of
simpleMatch(String[], String) that ignores upper/lower case. |
static boolean |
simpleMatchIgnoreCase(String pattern,
String str)
Variant of
simpleMatch(String, String) that ignores upper/lower case. |
public static boolean simpleMatch(@Nullable String pattern, @Nullable String str)
pattern
- the pattern to match againststr
- the String to matchpublic static boolean simpleMatchIgnoreCase(@Nullable String pattern, @Nullable String str)
simpleMatch(String, String)
that ignores upper/lower case.public static boolean simpleMatch(@Nullable String[] patterns, String str)
patterns
- the patterns to match againststr
- the String to matchpublic static boolean simpleMatchIgnoreCase(@Nullable String[] patterns, @Nullable String str)
simpleMatch(String[], String)
that ignores upper/lower case.