static class RegexStringComparator.JavaRegexEngine extends Object implements RegexStringComparator.Engine
This is the default engine.
| Modifier and Type | Field and Description |
|---|---|
private Charset |
charset |
private Pattern |
pattern |
| Constructor and Description |
|---|
JavaRegexEngine(String regex,
int flags) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(byte[] value,
int offset,
int length)
Match the given input against the configured pattern
|
String |
getCharset()
Returns the name of the configured charset
|
int |
getFlags()
Returns the set of configured match flags, a bit mask that may include
Pattern flags |
String |
getPattern()
Returns the string representation of the configured regular expression for matching
|
void |
setCharset(String charset)
Set the charset used when matching
|
byte[] |
toByteArray()
Return the serialized form of the configured matcher
|
public JavaRegexEngine(String regex, int flags)
public String getPattern()
RegexStringComparator.EnginegetPattern in interface RegexStringComparator.Enginepublic int getFlags()
RegexStringComparator.EnginePattern flagsgetFlags in interface RegexStringComparator.Enginepublic String getCharset()
RegexStringComparator.EnginegetCharset in interface RegexStringComparator.Enginepublic void setCharset(String charset)
RegexStringComparator.EnginesetCharset in interface RegexStringComparator.Enginecharset - the name of the desired charset for matchingpublic int compareTo(byte[] value, int offset, int length)
RegexStringComparator.EnginecompareTo in interface RegexStringComparator.Enginevalue - the data to be matchedoffset - offset of the data to be matchedlength - length of the data to be matchedpublic byte[] toByteArray()
RegexStringComparator.EnginetoByteArray in interface RegexStringComparator.EngineCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.