Package org.infinispan.commons.util
Class GlobMatcher
java.lang.Object
org.infinispan.commons.util.GlobMatcher
A matcher for glob patterns.
Matches the glob pattern without transforming into a Pattern
. Otherwise, it is possible to
convert with GlobUtils.globToRegex(String)
.
- Since:
- 15.0
- Author:
- José Bolina
- See Also:
-
Method Summary
-
Method Details
-
match
Checks whether the given string matches the glob pattern.Warning: This methods does not accept multi-byte strings.
- Parameters:
pattern
- : Glob pattern to check against.string
- : String to check for matching.- Returns:
true
if a match is found,false
, otherwise.
-
match
public static boolean match(byte[] pattern, byte[] string) Checks whether the given byte sequence matches the glob pattern describe as a byte sequence.Warning: This method does not accept multi-byte characters.
- Parameters:
pattern
- : The glob pattern represented as a byte sequence.string
- : The string represented as a byte sequence.- Returns:
true
if a match is found,false
, otherwise.
-