final class RangeToken extends Token implements java.io.Serializable
Token.CharToken, Token.ClosureToken, Token.ConcatToken, Token.ConditionToken, Token.FixedStringContainer, Token.ModifierToken, Token.ParenToken, Token.StringToken, Token.UnionToken| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
compacted |
(package private) RangeToken |
icaseCache |
(package private) int[] |
map |
private static int |
MAPSIZE |
(package private) int |
nonMapIndex |
(package private) int[] |
ranges |
(package private) boolean |
sorted |
ANCHOR, BACKREFERENCE, blockRanges, CHAR, CHAR_FINAL_QUOTE, CHAR_INIT_QUOTE, CHAR_LETTER, CHAR_MARK, CHAR_NUMBER, CHAR_OTHER, CHAR_PUNCTUATION, CHAR_SEPARATOR, CHAR_SYMBOL, CLOSURE, CONCAT, CONDITION, COUNTTOKENS, DOT, EMPTY, FC_ANY, FC_CONTINUE, FC_TERMINAL, INDEPENDENT, LOOKAHEAD, LOOKBEHIND, MODIFIERGROUP, NEGATIVELOOKAHEAD, NEGATIVELOOKBEHIND, nonBMPBlockRanges, NONGREEDYCLOSURE, nonxs, NRANGE, PAREN, RANGE, STRING, token_0to9, token_dot, token_empty, token_linebeginning, token_linebeginning2, token_lineend, token_not_0to9, token_not_spaces, token_not_wordchars, token_not_wordedge, token_spaces, token_stringbeginning, token_stringend, token_stringend2, token_wordbeginning, token_wordchars, token_wordedge, token_wordend, tokens, type, UNION, UTF16_MAX, viramaString| Constructor and Description |
|---|
RangeToken(int type) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRange(int start,
int end) |
protected void |
compactRanges()
this.ranges is sorted.
|
(package private) static Token |
complementRanges(Token token)
for RANGE: Creates complement.
|
private void |
createMap() |
(package private) void |
dumpRanges() |
private static java.lang.String |
escapeCharInCharClass(int ch) |
(package private) RangeToken |
getCaseInsensitiveToken() |
protected void |
intersectRanges(Token token) |
private boolean |
isCompacted() |
private boolean |
isSorted() |
(package private) boolean |
match(int ch) |
protected void |
mergeRanges(Token token) |
private void |
setCompacted() |
private void |
setSorted(boolean sort) |
protected void |
sortRanges() |
protected void |
subtractRanges(Token token) |
java.lang.String |
toString(int options) |
addChild, analyzeFirstCharacter, createBackReference, createChar, createClosure, createConcat, createConcat, createCondition, createEmpty, createLook, createModifierGroup, createNGClosure, createNRange, createParen, createRange, createString, createUnion, findFixedString, getChar, getChild, getCombiningCharacterSequence, getGraphemePattern, getMax, getMaxLength, getMin, getMinLength, getParenNumber, getRange, getRange, getReferenceNumber, getString, isRegisterNonXS, registerNonXS, setMax, setMin, size, toStringint[] ranges
boolean sorted
boolean compacted
RangeToken icaseCache
int[] map
int nonMapIndex
private static final int MAPSIZE
private final boolean isSorted()
private final void setSorted(boolean sort)
private final boolean isCompacted()
private final void setCompacted()
protected void sortRanges()
sortRanges in class Tokenprotected void compactRanges()
compactRanges in class Tokenprotected void mergeRanges(Token token)
mergeRanges in class Tokenprotected void subtractRanges(Token token)
subtractRanges in class Tokenprotected void intersectRanges(Token token)
intersectRanges in class Tokentoken - Ignore whether it is NRANGE or not.static Token complementRanges(Token token)
RangeToken getCaseInsensitiveToken()
void dumpRanges()
private void createMap()
private static java.lang.String escapeCharInCharClass(int ch)