| Modifier and Type | Field and Description |
|---|---|
| private static final int[] | |
| private static final int[][] | |
| private static final long[] | |
| private static final int[] | |
| private static final Map | |
| private static final int | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static long | Returns: a long value representing the case-folded form of the input code point, encoded as TBDthe Unicode code point to fold cp)Returns the case-folded form of the specified code point according to the Unicode case folding mappings. |
| public static int[] | Returns: aint[] containing the all simple case equivalents of characters in the range, excluding
those already in the rangethe starting code point of the character range start, int the ending code point of the character range end)Returns an expansion set to "close" a given regex Unicode character class range for case-sensitive matching, according to the Simple Loose Matches rule defined in Unicode Technical Standard #18: Unicode Regular Expressions. |
| private static long | |
| private static int[][] | |
| public static boolean | Returns: true if the given code point has a case folding mapping entry
defined in (@code caseFoldingMap}, false otherwisethe Unicode code point to test cp)Tests whether the specified code point has a folding mapping entry defined. |
| public static boolean |
| CASE_FOLDING_CPS | back to summary |
|---|---|
| private static final int[] CASE_FOLDING_CPS | |
| CASE_FOLDING_HASHES | back to summary |
|---|---|
| private static final int[][] CASE_FOLDING_HASHES | |
| CASE_FOLDING_VALUES | back to summary |
|---|---|
| private static final long[] CASE_FOLDING_VALUES | |
| expanded_case_cps | back to summary |
|---|---|
| private static final int[] expanded_case_cps | |
| expanded_case_map | back to summary |
|---|---|
| private static final Map<Integer, Integer> expanded_case_map | |
| HASH_CP | back to summary |
|---|---|
| private static final int HASH_CP | |
| HASH_INDEX | back to summary |
|---|---|
| private static final int HASH_INDEX | |
| HASH_NEXT | back to summary |
|---|---|
| private static final int HASH_NEXT | |
| CaseFolding | back to summary |
|---|---|
| private CaseFolding() | |
| fold | back to summary |
|---|---|
| public static long fold(int cp) Returns the case-folded form of the specified code point according to the Unicode case folding mappings. If the code point has no case folding mapping defined, this method returns the original code point. Possible combinations of the returning case-folding form as a long value +---+---------+--------+---------+--------+--------+ | 1:1 mapping | 0000 | 0000 | 000x | xxxx | 0041 => 0061 or 1E921 => 1E943 +---+---------+--------+---------+--------+--------+ | 1:2 mapping | 0002 | 0000 | xxxx | xxxx | FB02 => 0066 006C +---+---------+--------+---------+--------+--------+ | 1:3 mapping | 0003 | xxxx | xxxx | xxxx | FB03 => 0066 0066 0069 +---+---------+--------+---------+--------+--------+
| |
| getClassRangeClosingCharacters | back to summary |
|---|---|
| public static int[] getClassRangeClosingCharacters(int start, int end) Returns an expansion set to "close" a given regex Unicode character class range for case-sensitive matching, according to the Simple Loose Matches rule defined in Unicode Technical Standard #18: Unicode Regular Expressions. To conform with Level 1 of UTS #18, specifically RL1.5: Simple Loose Matches, simple case folding must be applied to literals and (optionally) to character classes. When applied to character classes, each character class is expected to be closed under simple case folding. See the standard for the detailed explanation and example of "closed". RL1.5 states: To meet this requirement, an implementation that supports case-sensitive matching should
In the
For loose/case-insensitive matching, the back-refs, slices and singles apply The family/char-properties are not "closed" and should remain unchanged. This is acceptable per RL1.5, if their behavior is clearly specified. This method addresses that requirement for the "range" construct within in character class by computing the additional characters that should be included to close the range under simple case folding:
For each character in the input range This allows regex character class "range" implementation to use the returned expansion set to support additional case-insensitive matching, without duplicating characters already covered by the existing regex range implementation. The expectation is the matching is done using both the uppercase and lowercase forms of the input character, for example
| |
| getDefined | back to summary |
|---|---|
| private static long getDefined(int cp) | |
| hashKeys | back to summary |
|---|---|
| private static int[][] hashKeys(int[] keys) | |
| isDefined | back to summary |
|---|---|
| public static boolean isDefined(int cp) Tests whether the specified code point has a folding mapping entry defined.
| |
| isSingleCodePoint | back to summary |
|---|---|
| public static boolean isSingleCodePoint(long fold) | |