Package org.apache.hadoop.hbase.filter
Interface RegexStringComparator.Engine
- All Known Implementing Classes:
RegexStringComparator.JavaRegexEngine
,RegexStringComparator.JoniRegexEngine
- Enclosing class:
- RegexStringComparator
static interface RegexStringComparator.Engine
This is an internal interface for abstracting access to different regular expression matching
engines.
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(byte[] value, int offset, int length) Match the given input against the configured patternReturns the name of the configured charsetint
getFlags()
Returns the set of configured match flags, a bit mask that may includePattern
flagsReturns the string representation of the configured regular expression for matchingvoid
setCharset
(String charset) Set the charset used when matchingbyte[]
Return the serialized form of the configured matcher
-
Method Details
-
getPattern
Returns the string representation of the configured regular expression for matching -
getFlags
int getFlags()Returns the set of configured match flags, a bit mask that may includePattern
flags -
getCharset
Returns the name of the configured charset -
setCharset
Set the charset used when matching- Parameters:
charset
- the name of the desired charset for matching
-
toByteArray
byte[] toByteArray()Return the serialized form of the configured matcher -
compareTo
Match the given input against the configured pattern- Parameters:
value
- the data to be matchedoffset
- offset of the data to be matchedlength
- length of the data to be matched- Returns:
- 0 if a match was made, 1 otherwise
-