public interface Globs
Support for shell-like glob patterns.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charThe character denoting plural quantifier ('*').static final charThe character denoting singular quantifier ('?'). -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic booleanstatic booleanChecks 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:
trueif the string matches the pattern,falseotherwise.
-
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:
trueif the string matches the pattern,falseotherwise.
-