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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(byte[] value, int offset, int length) Match the given input against the configured patternReturns the name of the configured charsetintgetFlags()Returns the set of configured match flags, a bit mask that may includePatternflagsReturns the string representation of the configured regular expression for matchingvoidsetCharset(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.EngineReturns the string representation of the configured regular expression for matching- Specified by:
getPatternin interfaceRegexStringComparator.Engine
-
getFlags
Description copied from interface:RegexStringComparator.EngineReturns the set of configured match flags, a bit mask that may includePatternflags- Specified by:
getFlagsin interfaceRegexStringComparator.Engine
-
getCharset
Description copied from interface:RegexStringComparator.EngineReturns the name of the configured charset- Specified by:
getCharsetin interfaceRegexStringComparator.Engine
-
setCharset
Description copied from interface:RegexStringComparator.EngineSet the charset used when matching- Specified by:
setCharsetin interfaceRegexStringComparator.Engine- Parameters:
charset- the name of the desired charset for matching
-
compareTo
Description copied from interface:RegexStringComparator.EngineMatch the given input against the configured pattern- Specified by:
compareToin 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.EngineReturn the serialized form of the configured matcher- Specified by:
toByteArrayin interfaceRegexStringComparator.Engine
-