Package org.apache.hadoop.hbase.filter
Class RegexStringComparator.JavaRegexEngine
java.lang.Object
org.apache.hadoop.hbase.filter.RegexStringComparator.JavaRegexEngine
- All Implemented Interfaces:
RegexStringComparator.Engine
- Enclosing class:
- RegexStringComparator
static class RegexStringComparator.JavaRegexEngine
extends Object
implements RegexStringComparator.Engine
Implementation of the Engine interface using Java's Pattern.
This is the default engine.
-
Field Summary
-
Constructor Summary
-
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
-
Field Details
-
charset
-
pattern
-
-
Constructor Details
-
JavaRegexEngine
-
-
Method Details
-
getPattern
Description copied from interface:RegexStringComparator.Engine
Returns the string representation of the configured regular expression for matching- Specified by:
getPattern
in interfaceRegexStringComparator.Engine
-
getFlags
Description copied from interface:RegexStringComparator.Engine
Returns the set of configured match flags, a bit mask that may includePattern
flags- Specified by:
getFlags
in interfaceRegexStringComparator.Engine
-
getCharset
Description copied from interface:RegexStringComparator.Engine
Returns the name of the configured charset- Specified by:
getCharset
in interfaceRegexStringComparator.Engine
-
setCharset
Description copied from interface:RegexStringComparator.Engine
Set the charset used when matching- Specified by:
setCharset
in interfaceRegexStringComparator.Engine
- Parameters:
charset
- the name of the desired charset for matching
-
compareTo
Description copied from interface:RegexStringComparator.Engine
Match the given input against the configured pattern- Specified by:
compareTo
in interfaceRegexStringComparator.Engine
- 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
-
toByteArray
Description copied from interface:RegexStringComparator.Engine
Return the serialized form of the configured matcher- Specified by:
toByteArray
in interfaceRegexStringComparator.Engine
-