public interface Globs
Support for shell-like glob patterns.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final char
The character denoting plural quantifier ('*').static final char
The character denoting singular quantifier ('?'). -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic boolean
static boolean
Checks if the string matches the given pattern using the given characters denoting singular and plural quantifiers.
-
Field Details
-
QUANTIFIER_SINGULAR
static final char QUANTIFIER_SINGULARThe character denoting singular quantifier ('?').- See Also:
-
QUANTIFIER_PLURAL
static final char QUANTIFIER_PLURALThe character denoting plural quantifier ('*').- See Also:
-
-
Method Details
-
matches
Checks if the string matches the given pattern using the given characters denoting singular and plural quantifiers.- Parameters:
pattern
- the pattern.string
- the string.singular
- the character denoting singular quantifier.plural
- the character denoting plural quantifier.- Returns:
true
if the string matches the pattern,false
otherwise.
-
matches
Checks if the string matches the given pattern using default quantifier notation ('?' for singular, '*' for plural).- Parameters:
pattern
- the pattern.string
- the string.- Returns:
true
if the string matches the pattern,false
otherwise.
-