Class WildcardPatternList
java.lang.Object
org.elasticsearch.xpack.esql.core.expression.predicate.regex.AbstractStringPattern
org.elasticsearch.xpack.esql.core.expression.predicate.regex.WildcardPatternList
- All Implemented Interfaces:
Writeable,StringPattern
A list of wildcard patterns. Each pattern is a
WildcardPattern that can be used to match strings and is
similar to basic regex, supporting '?' wildcard for single character (same as regex ".")
and '*' wildcard for multiple characters (same as regex ".*")
Allows escaping based on a regular char.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a Java regex that matches any of the patterns in the list.org.apache.lucene.util.automaton.AutomatoncreateAutomaton(boolean ignoreCase) Creates an automaton that matches any of the patterns in the list.booleaninthashCode()pattern()Returns a string that matches any of the patterns in the list.voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.core.expression.predicate.regex.AbstractStringPattern
exactMatch, matchesAll
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
WildcardPatternList
-
WildcardPatternList
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
patternList
-
createAutomaton
public org.apache.lucene.util.automaton.Automaton createAutomaton(boolean ignoreCase) Creates an automaton that matches any of the patterns in the list. We create a single automaton that is the union of all individual automata to improve performance- Specified by:
createAutomatonin classAbstractStringPattern
-
asJavaRegex
Returns a Java regex that matches any of the patterns in the list. The patterns are joined with the '|' operator to create a single regex.- Specified by:
asJavaRegexin interfaceStringPattern
-
pattern
Returns a string that matches any of the patterns in the list. The patterns are joined with the '|' operator to create a single wildcard string.- Specified by:
patternin interfaceStringPattern
-
hashCode
public int hashCode() -
equals
-