Class UnicodeSet.XSymbolTable
java.lang.Object
com.ibm.icu.text.UnicodeSet.XSymbolTable
- All Implemented Interfaces:
SymbolTable
- Enclosing class:
UnicodeSet
Internal class for customizing UnicodeSet parsing of properties. TODO: extend to allow
customizing of codepoint ranges
- Author:
- medavis
- Status:
- Draft ICU3.8 (retain).
-
Field Summary
Fields inherited from interface SymbolTable
SYMBOL_REFModifier and TypeFieldDescriptionstatic final charThe character preceding a symbol reference name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplyPropertyAlias(String propertyName, String propertyValue, UnicodeSet result) Override the interpretation of the sequence [:propertyName=propertyValue:] (and its negated and Perl-style variant).char[]Supplies default implementation for SymbolTable (no action).lookupMatcher(int i) Supplies default implementation for SymbolTable (no action).parseReference(String text, ParsePosition pos, int limit) Supplies default implementation for SymbolTable (no action).scanVariable(String text, ParsePosition pos, int limit) Deprecated.This API is ICU internal only.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SymbolTable
lookupSet
-
Constructor Details
-
XSymbolTable
public XSymbolTable()Default constructor- Status:
- Draft ICU3.8 (retain).
-
-
Method Details
-
lookupMatcher
Supplies default implementation for SymbolTable (no action).- Specified by:
lookupMatcherin interfaceSymbolTable- Parameters:
i- a 32-bit code point from 0 to 0x10FFFF inclusive.- Returns:
- the UnicodeMatcher object represented by the given character, or null if there is no mapping for ch.
- Status:
- Draft ICU3.8 (retain).
-
applyPropertyAlias
Override the interpretation of the sequence [:propertyName=propertyValue:] (and its negated and Perl-style variant). The propertyName and propertyValue may be existing Unicode aliases, or may not be.This routine will be called whenever the parsing of a UnicodeSet pattern finds such a propertyName+propertyValue combination.
- Parameters:
propertyName- the name of the propertypropertyValue- the name of the property valueresult- UnicodeSet value to change a set to which the characters having the propertyName+propertyValue are to be added.- Returns:
- returns true if the propertyName+propertyValue combination is to be overridden, and the characters with that property have been added to the UnicodeSet, and returns false if the propertyName+propertyValue combination is not recognized (in which case result is unaltered).
- Status:
- Draft ICU3.8 (retain).
-
lookup
Supplies default implementation for SymbolTable (no action).- Specified by:
lookupin interfaceSymbolTable- Parameters:
s- the symbolic name to lookup- Returns:
- a char array containing the name's value, or null if there is no mapping for s.
- Status:
- Draft ICU3.8 (retain).
-
parseReference
Supplies default implementation for SymbolTable (no action).- Specified by:
parseReferencein interfaceSymbolTable- Parameters:
text- the text to parse for the namepos- on entry, the index of the first character to parse. This is the character following the SYMBOL_REF character. On exit, the index after the last parsed character. If the parse failed, pos is unchanged on exit.limit- the index after the last character to be parsed.- Returns:
- the parsed name, or null if there is no valid symbolic name at the given position.
- Status:
- Draft ICU3.8 (retain).
-
scanVariable
Deprecated.This API is ICU internal only.If the source text has a valid variable starting at pos, advances pos past that variable and returns the name that should be passed to lookup or lookupSet. Otherwise, returns null and does not advance pos. By default, this method checks for variables with a $ sigil, but it can be overriden to support other variable syntaxes, e.g., the use of short Line_Break value aliases for sets in UAX #14 rules ([QU-\p{Pi}] for [\p{lb=QU}-\p{Pi}]).- Status:
- Internal. This API is ICU internal only.
-