public final class BitSetMatcher extends InvertibleCharMatcher
တ, ဠ, ူ have a common high byte 0x10, so they
are matched by this high byte and a bit set that matches 0x10, 0x20 and
0x30.| Modifier and Type | Method and Description |
|---|---|
static InvertibleCharMatcher |
create(boolean invert,
int highByte,
long[] bitSet)
Constructs a new bit-set-based character matcher.
|
int |
estimatedCost()
Conservatively estimate the equivalent number of integer comparisons of calling
CharMatcher.match(int). |
long[] |
getBitSet() |
boolean |
match(int c)
Check if a given code point matches this
CharMatcher. |
String |
toString() |
modifiersToString, result, resultpublic static InvertibleCharMatcher create(boolean invert, int highByte, long[] bitSet)
invert - see InvertibleCharMatcher.highByte - the high byte common to all characters to match.bitSet - the bit set to match the low byte of the characters to match.BitSetMatcher or a NullHighByteBitSetMatcher.public long[] getBitSet()
public boolean match(int c)
CharMatcherCharMatcher.match in class CharMatcherc - any code point.true if the character matches.CompilerDirectives.isPartialEvaluationConstant(Object)public int estimatedCost()
CharMatcherCharMatcher.match(int).estimatedCost in class CharMatcherCharMatcher.match(int) is roughly
equivalent to. Array loads are treated as two comparisons.