public class JavaUtilRegexCapabilities extends Object implements RegexCapabilities
RegexCapabilities.RegexMatcher.prefix()
that queries using this implementation
will enumerate and attempt to RegexCapabilities.RegexMatcher.match(BytesRef)
each
term for the specified field in the index.RegexCapabilities.RegexMatcher
Modifier and Type | Field and Description |
---|---|
static int |
FLAG_CANON_EQ |
static int |
FLAG_CASE_INSENSITIVE |
static int |
FLAG_COMMENTS |
static int |
FLAG_DOTALL |
static int |
FLAG_LITERAL |
static int |
FLAG_MULTILINE |
static int |
FLAG_UNICODE_CASE |
static int |
FLAG_UNIX_LINES |
Constructor and Description |
---|
JavaUtilRegexCapabilities()
Default constructor that uses java.util.regex.Pattern
with its default flags.
|
JavaUtilRegexCapabilities(int flags)
Constructor that allows for the modification of the flags that
the java.util.regex.Pattern will use to compile the regular expression.
|
Modifier and Type | Method and Description |
---|---|
RegexCapabilities.RegexMatcher |
compile(String regex)
Called by the constructor of
RegexTermsEnum allowing
implementations to cache a compiled version of the regular
expression pattern. |
boolean |
equals(Object obj) |
int |
hashCode() |
public static final int FLAG_CANON_EQ
public static final int FLAG_CASE_INSENSITIVE
public static final int FLAG_COMMENTS
public static final int FLAG_DOTALL
public static final int FLAG_LITERAL
public static final int FLAG_MULTILINE
public static final int FLAG_UNICODE_CASE
public static final int FLAG_UNIX_LINES
public JavaUtilRegexCapabilities()
public JavaUtilRegexCapabilities(int flags)
Pattern
class supports specifying
these fields via the regular expression text itself, but this gives the caller
another option to modify the behavior. Useful in cases where the regular expression text
cannot be modified, or if doing so is undesired.flags
- The flags that are ORed together.public RegexCapabilities.RegexMatcher compile(String regex)
RegexCapabilities
RegexTermsEnum
allowing
implementations to cache a compiled version of the regular
expression pattern.compile
in interface RegexCapabilities
regex
- regular expression patternCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.