org.enhydra.apache.xerces.utils.regex
Class RangeToken
java.lang.Object
|
+--org.enhydra.apache.xerces.utils.regex.Token
|
+--org.enhydra.apache.xerces.utils.regex.RangeToken
- All Implemented Interfaces:
- Serializable
- final class RangeToken
- extends Token
- implements Serializable
This class represents a character class such as [a-z] or a period.
- See Also:
- Serialized Form
Fields inherited from class org.enhydra.apache.xerces.utils.regex.Token |
ANCHOR, BACKREFERENCE, blockNames, blockRanges, categories, categories2, categoryNames, 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, NONGREEDYCLOSURE, 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 Summary |
(package private) |
RangeToken(int type)
|
Methods inherited from class org.enhydra.apache.xerces.utils.regex.Token |
, 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, getReferenceNumber, getString, setMax, setMin, size, toString |
ranges
int[] ranges
sorted
boolean sorted
compacted
boolean compacted
icaseCache
RangeToken icaseCache
map
int[] map
nonMapIndex
int nonMapIndex
RangeToken
RangeToken(int type)
addRange
protected void addRange(int start,
int end)
- Overrides:
addRange
in class Token
sortRanges
protected void sortRanges()
- Overrides:
sortRanges
in class Token
compactRanges
protected void compactRanges()
- this.ranges is sorted.
- Overrides:
compactRanges
in class Token
mergeRanges
protected void mergeRanges(Token token)
- Overrides:
mergeRanges
in class Token
subtractRanges
protected void subtractRanges(Token token)
- Overrides:
subtractRanges
in class Token
intersectRanges
protected void intersectRanges(Token token)
- Overrides:
intersectRanges
in class Token
- Parameters:
tok
- Ignore whether it is NRANGE or not.
complementRanges
static Token complementRanges(Token token)
- for RANGE: Creates complement.
for NRANGE: Creates the same meaning RANGE.
getCaseInsensitiveToken
RangeToken getCaseInsensitiveToken()
dumpRanges
void dumpRanges()
match
boolean match(int ch)
- Overrides:
match
in class Token
toString
public String toString(int options)
- Overrides:
toString
in class Token
Copyright © 1999 The Apache Software Foundation. All Rights reserved.