public class JakartaRegexpCapabilities extends java.lang.Object implements RegexCapabilities
prefix()
implementation.Modifier and Type | Field and Description |
---|---|
static int |
FLAG_MATCH_CASEINDEPENDENT
Flag to specify that matching should be case-independent (folded)
|
static int |
FLAG_MATCH_NORMAL
Flag to specify normal, case-sensitive matching behaviour.
|
Constructor and Description |
---|
JakartaRegexpCapabilities()
Constructs a RegexCapabilities with the default MATCH_NORMAL match style.
|
JakartaRegexpCapabilities(int flags)
Constructs a RegexCapabilities with the provided match flags.
|
Modifier and Type | Method and Description |
---|---|
void |
compile(java.lang.String pattern)
Called by the constructor of
RegexTermEnum allowing
implementations to cache a compiled version of the regular
expression pattern. |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
match(java.lang.String string) |
java.lang.String |
prefix()
A wise prefix implementation can reduce the term enumeration (and thus increase performance)
of RegexQuery dramatically!
|
public static final int FLAG_MATCH_NORMAL
public static final int FLAG_MATCH_CASEINDEPENDENT
public JakartaRegexpCapabilities()
public JakartaRegexpCapabilities(int flags)
flags
- The matching stylepublic void compile(java.lang.String pattern)
RegexCapabilities
RegexTermEnum
allowing
implementations to cache a compiled version of the regular
expression pattern.compile
in interface RegexCapabilities
pattern
- regular expression patternpublic boolean match(java.lang.String string)
match
in interface RegexCapabilities
RegexCapabilities.compile(java.lang.String)
.public java.lang.String prefix()
RegexCapabilities
prefix
in interface RegexCapabilities
RegexCapabilities.compile(java.lang.String)
. May return null.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.