APIdia Launch Partner
Top Description Inners Fields Constructors Methods
java.lang

pack-priv final Class ConditionalSpecialCasing

extends Object
Class Inheritance
Imports
java.text.BreakIterator, java.util.HashMap, .HashSet, .Iterator, .Locale, sun.text.Normalizer

This is a utility class for String.toLowerCase() and String.toUpperCase(), that handles special casing with conditions. In other words, it handles the mappings with conditions that are defined in Special Casing Properties file.

Note that the unconditional case mappings (including 1:M mappings) are handled in Character.toLower/UpperCase().

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
ConditionalSpecialCasing.Entry

An internal class that represents an entry in the Special Casing Properties.

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static ConditionalSpecialCasing.Entry[]
private static final HashMap<Integer, HashSet<ConditionalSpecialCasing.Entry>>
pack-priv static final int
pack-priv static final int
pack-priv static final int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static boolean
isAfterI(String src, int index)

Implements the "After_I" condition

Specification

The last preceding base character was an uppercase I, and there is no intervening combining character class 230 (ABOVE).

private static boolean
isAfterSoftDotted(String src, int index)

Implements the "After_Soft_Dotted" condition

Specification

The last preceding character with combining class of zero before C was Soft_Dotted, and there is no intervening combining character class 230 (ABOVE).

private static boolean
isBeforeDot(String src, int index)

Implements the "Before_Dot" condition

Specification

C is followed by U+0307 COMBINING DOT ABOVE.

private static boolean
isCased(int ch)

Examines whether a character is 'cased'.

private static boolean
isConditionMet(String src, int index, Locale locale, int condition)

private static boolean
isFinalCased(String src, int index, Locale locale)

Implements the "Final_Cased" condition

Specification

Within the closest word boundaries containing C, there is a cased letter before C, and there is no cased letter after C.

private static boolean
isMoreAbove(String src, int index)

Implements the "More_Above" condition

Specification

C is followed by one or more characters of combining class 230 (ABOVE) in the combining character sequence.

private static boolean
isSoftDotted(int ch)

private static char[]
lookUpTable(String src, int index, Locale locale, boolean bLowerCasing)

pack-priv static char[]
toLowerCaseCharArray(String src, int index, Locale locale)

pack-priv static int
toLowerCaseEx(String src, int index, Locale locale)

pack-priv static char[]
toUpperCaseCharArray(String src, int index, Locale locale)

pack-priv static int
toUpperCaseEx(String src, int index, Locale locale)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AFTER_Iback to summary
pack-priv static final int AFTER_I
AFTER_SOFT_DOTTEDback to summary
pack-priv static final int AFTER_SOFT_DOTTED
COMBINING_CLASS_ABOVEback to summary
pack-priv static final int COMBINING_CLASS_ABOVE
entryback to summary
pack-priv static ConditionalSpecialCasing.Entry[] entry
entryTableback to summary
private static final HashMap<Integer, HashSet<ConditionalSpecialCasing.Entry>> entryTable
FINAL_CASEDback to summary
pack-priv static final int FINAL_CASED
MORE_ABOVEback to summary
pack-priv static final int MORE_ABOVE
NOT_BEFORE_DOTback to summary
pack-priv static final int NOT_BEFORE_DOT

Constructor Detail

ConditionalSpecialCasingback to summary
pack-priv ConditionalSpecialCasing()

Method Detail

isAfterIback to summary
private static boolean isAfterI(String src, int index)

Implements the "After_I" condition

Specification

The last preceding base character was an uppercase I, and there is no intervening combining character class 230 (ABOVE). Regular Expression: Before C: [I]([{cc!=230}&{cc!=0}])*

isAfterSoftDottedback to summary
private static boolean isAfterSoftDotted(String src, int index)

Implements the "After_Soft_Dotted" condition

Specification

The last preceding character with combining class of zero before C was Soft_Dotted, and there is no intervening combining character class 230 (ABOVE). Regular Expression: Before C: [{Soft_Dotted==true}]([{cc!=230}&{cc!=0}])*

isBeforeDotback to summary
private static boolean isBeforeDot(String src, int index)

Implements the "Before_Dot" condition

Specification

C is followed by U+0307 COMBINING DOT ABOVE. Any sequence of characters with a combining class that is neither 0 nor 230 may intervene between the current character and the combining dot above. Regular Expression: After C: ([{cc!=230}&{cc!=0}])*[̇]

isCasedback to summary
private static boolean isCased(int ch)

Examines whether a character is 'cased'. A character C is defined to be 'cased' if and only if at least one of following are true for C: uppercase==true, or lowercase==true, or general_category==titlecase_letter. The uppercase and lowercase property values are specified in the data file DerivedCoreProperties.txt in the Unicode Character Database.

isConditionMetback to summary
private static boolean isConditionMet(String src, int index, Locale locale, int condition)
isFinalCasedback to summary
private static boolean isFinalCased(String src, int index, Locale locale)

Implements the "Final_Cased" condition

Specification

Within the closest word boundaries containing C, there is a cased letter before C, and there is no cased letter after C. Regular Expression: Before C: [{cased==true}][{wordBoundary!=true}]* After C: !([{wordBoundary!=true}]*[{cased}])

isMoreAboveback to summary
private static boolean isMoreAbove(String src, int index)

Implements the "More_Above" condition

Specification

C is followed by one or more characters of combining class 230 (ABOVE) in the combining character sequence. Regular Expression: After C: [{cc!=0}]*[{cc==230}]

isSoftDottedback to summary
private static boolean isSoftDotted(int ch)
lookUpTableback to summary
private static char[] lookUpTable(String src, int index, Locale locale, boolean bLowerCasing)
toLowerCaseCharArrayback to summary
pack-priv static char[] toLowerCaseCharArray(String src, int index, Locale locale)
toLowerCaseExback to summary
pack-priv static int toLowerCaseEx(String src, int index, Locale locale)
toUpperCaseCharArrayback to summary
pack-priv static char[] toUpperCaseCharArray(String src, int index, Locale locale)
toUpperCaseExback to summary
pack-priv static int toUpperCaseEx(String src, int index, Locale locale)
java.lang back to summary

pack-priv Class ConditionalSpecialCasing.Entry

extends Object
Class Inheritance

An internal class that represents an entry in the Special Casing Properties.

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv int
pack-priv String
pack-priv char[]
pack-priv char[]

Constructor Summary

AccessConstructor and Description
pack-priv
Entry(int ch, char[] lower, char[] upper, String lang, int condition)

Method Summary

Modifier and TypeMethod and Description
pack-priv int
pack-priv int
pack-priv String
pack-priv char[]
pack-priv char[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

chback to summary
pack-priv int ch
conditionback to summary
pack-priv int condition
langback to summary
pack-priv String lang
lowerback to summary
pack-priv char[] lower
upperback to summary
pack-priv char[] upper

Constructor Detail

Entryback to summary
pack-priv Entry(int ch, char[] lower, char[] upper, String lang, int condition)

Method Detail

getCodePointback to summary
pack-priv int getCodePoint()
getConditionback to summary
pack-priv int getCondition()
getLanguageback to summary
pack-priv String getLanguage()
getLowerCaseback to summary
pack-priv char[] getLowerCase()
getUpperCaseback to summary
pack-priv char[] getUpperCase()