2362N/A * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This is a utility class for <code>String.toLowerCase()</code> and 0N/A * <code>String.toUpperCase()</code>, that handles special casing with 0N/A * conditions. In other words, it handles the mappings with conditions 0N/A * that are defined in 0N/A * Casing Properties</a> file. 0N/A * Note that the unconditional case mappings (including 1:M mappings) 0N/A // context conditions. 0N/A // combining class definitions 0N/A // Special case mapping entries 0N/A //# ================================================================================ 0N/A //# Conditional mappings 0N/A //# ================================================================================ 0N/A //# ================================================================================ 0N/A //# Locale-sensitive mappings 0N/A //# ================================================================================ 0N/A new Entry(
0x0049,
new char[]{
0x0069,
0x0307},
new char[]{
0x0049},
"lt",
MORE_ABOVE),
// # LATIN CAPITAL LETTER I 0N/A new Entry(
0x004A,
new char[]{
0x006A,
0x0307},
new char[]{
0x004A},
"lt",
MORE_ABOVE),
// # LATIN CAPITAL LETTER J 0N/A new Entry(
0x012E,
new char[]{
0x012F,
0x0307},
new char[]{
0x012E},
"lt",
MORE_ABOVE),
// # LATIN CAPITAL LETTER I WITH OGONEK 0N/A new Entry(
0x00CC,
new char[]{
0x0069,
0x0307,
0x0300},
new char[]{
0x00CC},
"lt",
0),
// # LATIN CAPITAL LETTER I WITH GRAVE 0N/A new Entry(
0x00CD,
new char[]{
0x0069,
0x0307,
0x0301},
new char[]{
0x00CD},
"lt",
0),
// # LATIN CAPITAL LETTER I WITH ACUTE 0N/A new Entry(
0x0128,
new char[]{
0x0069,
0x0307,
0x0303},
new char[]{
0x0128},
"lt",
0),
// # LATIN CAPITAL LETTER I WITH TILDE 1091N/A new Entry(
0x0130,
new char[]{
0x0069,
0x0307},
new char[]{
0x0130},
"lt",
0),
// # LATIN CAPITAL LETTER I WITH DOT ABOVE 0N/A //# ================================================================================ 0N/A //# Turkish and Azeri 0N/A// new Entry(0x0130, new char[]{0x0069}, new char[]{0x0130}, "tr", 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE 0N/A// new Entry(0x0130, new char[]{0x0069}, new char[]{0x0130}, "az", 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE 0N/A new Entry(
0x0307,
new char[]{},
new char[]{
0x0307},
"tr",
AFTER_I),
// # COMBINING DOT ABOVE 0N/A new Entry(
0x0307,
new char[]{},
new char[]{
0x0307},
"az",
AFTER_I),
// # COMBINING DOT ABOVE 0N/A new Entry(
0x0069,
new char[]{
0x0069},
new char[]{
0x0130},
"tr",
0),
// # LATIN SMALL LETTER I 1091N/A new Entry(
0x0069,
new char[]{
0x0069},
new char[]{
0x0130},
"az",
0),
// # LATIN SMALL LETTER I 1091N/A //# ================================================================================ 1091N/A new Entry(
0x0130,
new char[]{
0x0069,
0x0307},
new char[]{
0x0130},
"en",
0),
// # LATIN CAPITALLETTER I WITH DOT ABOVE 0N/A // A hash table that contains the above entries 0N/A // create hashtable from the entry 0N/A // default to Character class' one 0N/A // default to Character class' one 0N/A * Implements the "Final_Cased" condition 0N/A * Specification: Within the closest word boundaries containing C, there is a cased 0N/A * letter before C, and there is no cased letter after C. 0N/A * Regular Expression: 0N/A * Before C: [{cased==true}][{wordBoundary!=true}]* 0N/A * After C: !([{wordBoundary!=true}]*[{cased}]) 0N/A // Look for a preceding 'cased' letter 0N/A // Check that there is no 'cased' letter after the index 0N/A * Implements the "After_I" condition 0N/A * Specification: The last preceding base character was an uppercase I, 0N/A * and there is no intervening combining character class 230 (ABOVE). 0N/A * Regular Expression: 0N/A * Before C: [I]([{cc!=230}&{cc!=0}])* 0N/A // Look for the last preceding base character 0N/A * Implements the "After_Soft_Dotted" condition 0N/A * Specification: The last preceding character with combining class 0N/A * of zero before C was Soft_Dotted, and there is no intervening 0N/A * combining character class 230 (ABOVE). 0N/A * Regular Expression: 0N/A * Before C: [{Soft_Dotted==true}]([{cc!=230}&{cc!=0}])* 0N/A // Look for the last preceding character 0N/A * Implements the "More_Above" condition 0N/A * Specification: C is followed by one or more characters of combining 0N/A * class 230 (ABOVE) in the combining character sequence. 0N/A * Regular Expression: 0N/A * After C: [{cc!=0}]*[{cc==230}] 0N/A // Look for a following ABOVE combining class character 0N/A * Implements the "Before_Dot" condition 0N/A * Specification: C is followed by <code>U+0307 COMBINING DOT ABOVE</code>. 0N/A * Any sequence of characters with a combining class that is 0N/A * neither 0 nor 230 may intervene between the current character 0N/A * and the combining dot above. 0N/A * Regular Expression: 0N/A * After C: ([{cc!=230}&{cc!=0}])*[\u0307] 0N/A // Look for a following COMBINING DOT ABOVE 0N/A * Examines whether a character is 'cased'. 0N/A * A character C is defined to be 'cased' if and only if at least one of 0N/A * following are true for C: uppercase==true, or lowercase==true, or 0N/A * general_category==titlecase_letter. 0N/A * The uppercase and lowercase property values are specified in the data 0N/A // Check for Other_Lowercase and Other_Uppercase 0N/A if ((
ch >=
0x02B0) && (
ch <=
0x02B8)) {
0N/A // MODIFIER LETTER SMALL H..MODIFIER LETTER SMALL Y 0N/A }
else if ((
ch >=
0x02C0) && (
ch <=
0x02C1)) {
0N/A // MODIFIER LETTER GLOTTAL STOP..MODIFIER LETTER REVERSED GLOTTAL STOP 0N/A }
else if ((
ch >=
0x02E0) && (
ch <=
0x02E4)) {
0N/A // MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP 0N/A }
else if (
ch ==
0x0345) {
0N/A // COMBINING GREEK YPOGEGRAMMENI 0N/A }
else if (
ch ==
0x037A) {
0N/A // GREEK YPOGEGRAMMENI 0N/A }
else if ((
ch >=
0x1D2C) && (
ch <=
0x1D61)) {
0N/A // MODIFIER LETTER CAPITAL A..MODIFIER LETTER SMALL CHI 0N/A }
else if ((
ch >=
0x2160) && (
ch <=
0x217F)) {
0N/A // ROMAN NUMERAL ONE..ROMAN NUMERAL ONE THOUSAND 0N/A // SMALL ROMAN NUMERAL ONE..SMALL ROMAN NUMERAL ONE THOUSAND 0N/A }
else if ((
ch >=
0x24B6) && (
ch <=
0x24E9)) {
0N/A // CIRCLED LATIN CAPITAL LETTER A..CIRCLED LATIN CAPITAL LETTER Z 0N/A // CIRCLED LATIN SMALL LETTER A..CIRCLED LATIN SMALL LETTER Z 0N/A case 0x0069:
// Soft_Dotted # L& LATIN SMALL LETTER I 0N/A case 0x006A:
// Soft_Dotted # L& LATIN SMALL LETTER J 0N/A case 0x012F:
// Soft_Dotted # L& LATIN SMALL LETTER I WITH OGONEK 0N/A case 0x0268:
// Soft_Dotted # L& LATIN SMALL LETTER I WITH STROKE 0N/A case 0x0456:
// Soft_Dotted # L& CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I 0N/A case 0x0458:
// Soft_Dotted # L& CYRILLIC SMALL LETTER JE 0N/A case 0x1D62:
// Soft_Dotted # L& LATIN SUBSCRIPT SMALL LETTER I 0N/A case 0x1E2D:
// Soft_Dotted # L& LATIN SMALL LETTER I WITH TILDE BELOW 0N/A case 0x1ECB:
// Soft_Dotted # L& LATIN SMALL LETTER I WITH DOT BELOW 0N/A case 0x2071:
// Soft_Dotted # L& SUPERSCRIPT LATIN SMALL LETTER I 0N/A * An internal class that represents an entry in the Special Casing Properties.