Module org.elasticsearch.xcore
Class StringMatcher
java.lang.Object
org.elasticsearch.xpack.core.security.support.StringMatcher
This class acts as a facade / encapsulation around the expression and testing of string-based patterns within Elasticsearch security.
Security supports "wildcards" in a number of places (e.g. index names within roles). These cases also support
Lucene-syntax regular expressions and are implemented via Lucene
Automaton objects.
However, it can be more efficient to have special handling and avoid Automata for particular cases such as exact string matches.
This class handles that logic, an provides a clean interface for
test whether a provided string matches one of an existing set of patterns that hides the possible implementation options.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic StringMatcher.Builderbuilder()booleanisTotal()static StringMatcherstatic StringMatcherbooleantoString()