Package dev.sigstore.strings
Interface StringMatcher
An interface for allowing direct string matching or regular expressions. Use the static factory
string(String)
or regex(String)
to instantiate the appropriate matcher. Custom
implementations should override Object.toString()
for better error reporting.-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic StringMatcher
Create a matcher using regular expressions.static StringMatcher
Create a matcher for string equality.
-
Method Details
-
string
Create a matcher for string equality. -
regex
Create a matcher using regular expressions. Regex matching ignores null values and returns false instead of erroring.- Parameters:
string
- the input pattern- Returns:
- a regex based instance
- Throws:
RegexSyntaxException
- if the input pattern is not valid regex. This is a runtime exception and probably should be handled
-