Class WildcardMatcher
java.lang.Object
io.confluent.kafka.schemaregistry.utils.WildcardMatcher
A wildcard matcher.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
WildcardMatcher
public WildcardMatcher()
-
-
Method Details
-
match
Matches fully-qualified names that use dot (.) as the name boundary.A '?' matches a single character. A '*' matches one or more characters within a name boundary. A '**' matches one or more characters across name boundaries.
Examples:
wildcardMatch("eve", "eve*") --> true wildcardMatch("alice.bob.eve", "a*.bob.eve") --> true wildcardMatch("alice.bob.eve", "a*.bob.e*") --> true wildcardMatch("alice.bob.eve", "a*") --> false wildcardMatch("alice.bob.eve", "a**") --> true wildcardMatch("alice.bob.eve", "alice.bob*") --> false wildcardMatch("alice.bob.eve", "alice.bob**") --> true- Parameters:
str- the string to match onwildcardMatcher- the wildcard string to match against- Returns:
- true if the string matches the wildcard string
-