public class GlobMatcher
extends java.lang.Object
| Constructor and Description |
|---|
GlobMatcher(java.lang.String pattern)
Constructor.
|
GlobMatcher(java.lang.String pattern,
boolean caseInsensitive)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Predicate1<java.lang.String> |
asPredicate()
Get this matcher as a predicate.
|
boolean |
equals(java.lang.Object o) |
int |
getCardinality()
Get the cardinality of this matcher.
|
java.lang.String |
getPattern()
Get the pattern.
|
int |
hashCode() |
boolean |
hasWildCards()
Is this glob matcher using wildcards?
|
boolean |
isMatching(java.lang.String str)
Is a given string matching this pattern?
|
static void |
main(java.lang.String[] args) |
java.lang.String |
toString()
Returns a string representation of the object.
|
static GlobMatcher |
whenUsingGlobbing(java.lang.String pattern,
boolean caseInsensitive)
Get a matcher if the given pattern uses globbing.
|
public GlobMatcher(@NotNull java.lang.String pattern)
pattern - patternpublic GlobMatcher(@NotNull java.lang.String pattern, boolean caseInsensitive)
pattern - patterncaseInsensitive - make the matcher case-insensitive?@NotNull public java.lang.String getPattern()
public int getCardinality()
public boolean hasWildCards()
@NotNull public Predicate1<java.lang.String> asPredicate()
true if this pattern matches@Nullable public static GlobMatcher whenUsingGlobbing(@NotNull java.lang.String pattern, boolean caseInsensitive)
pattern - the patterncaseInsensitive - make the matcher case-insensitivenull if the string does not contain wildcardspublic boolean isMatching(@NotNull java.lang.String str)
str - the stringtrue if the string is matching, false otherwisepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic static void main(@NotNull java.lang.String[] args)