diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/UBiDiProps.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/UBiDiProps.java
index 0b128d2bbb0..2608a166339 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/impl/UBiDiProps.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/UBiDiProps.java
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 2004-2007, International Business Machines
+* Copyright (C) 2004-2009, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -35,15 +35,21 @@ public final class UBiDiProps {
// constructors etc. --------------------------------------------------- ***
// port of ubidi_openProps()
- public UBiDiProps() throws IOException{
+ private UBiDiProps() throws IOException{
InputStream is=ICUData.getStream(ICUResourceBundle.ICU_BUNDLE+"/"+DATA_FILE_NAME);
BufferedInputStream b=new BufferedInputStream(is, 4096 /* data buffer size */);
readData(b);
b.close();
is.close();
-
}
+ private UBiDiProps(boolean makeDummy) { // ignore makeDummy, only creates a unique signature
+ indexes=new int[IX_TOP];
+ indexes[0]=IX_TOP;
+ trie=new CharTrie(0, 0, null); // dummy trie, always returns 0
+ }
+
+
private void readData(InputStream is) throws IOException {
DataInputStream inputStream=new DataInputStream(is);
@@ -91,24 +97,18 @@ public final class UBiDiProps {
}
}
- // UBiDiProps singleton
- private static UBiDiProps gBdp=null;
-
// port of ubidi_getSingleton()
- public static final synchronized UBiDiProps getSingleton() throws IOException {
- if(gBdp==null) {
- gBdp=new UBiDiProps();
+ //
+ // Note: Do we really need this API?
+ public static UBiDiProps getSingleton() throws IOException {
+ if (FULL_INSTANCE == null) {
+ synchronized (UBiDiProps.class) {
+ if (FULL_INSTANCE == null) {
+ FULL_INSTANCE = new UBiDiProps();
+ }
+ }
}
- return gBdp;
- }
-
- // UBiDiProps dummy singleton
- private static UBiDiProps gBdpDummy=null;
-
- private UBiDiProps(boolean makeDummy) { // ignore makeDummy, only creates a unique signature
- indexes=new int[IX_TOP];
- indexes[0]=IX_TOP;
- trie=new CharTrie(0, 0, null); // dummy trie, always returns 0
+ return FULL_INSTANCE;
}
/**
@@ -117,11 +117,16 @@ public final class UBiDiProps {
* Using the dummy can reduce checks for available data after an initial failure.
* Port of ucase_getDummy().
*/
- public static final synchronized UBiDiProps getDummy() {
- if(gBdpDummy==null) {
- gBdpDummy=new UBiDiProps(true);
+ // Note: do we really need this API?
+ public static UBiDiProps getDummy() {
+ if (DUMMY_INSTANCE == null) {
+ synchronized (UBiDiProps.class) {
+ if (DUMMY_INSTANCE == null) {
+ DUMMY_INSTANCE = new UBiDiProps(true);
+ }
+ }
}
- return gBdpDummy;
+ return DUMMY_INSTANCE;
}
// set of property starts for UnicodeSet ------------------------------- ***
@@ -323,4 +328,28 @@ public final class UBiDiProps {
private static final int getMirrorIndex(int m) {
return m>>>MIRROR_INDEX_SHIFT;
}
+
+
+ /*
+ * public singleton instance
+ */
+ public static final UBiDiProps INSTANCE;
+
+ private static volatile UBiDiProps FULL_INSTANCE;
+ private static volatile UBiDiProps DUMMY_INSTANCE;
+
+ // This static initializer block must be placed after
+ // other static member initialization
+ static {
+ UBiDiProps bp;
+ try {
+ bp = new UBiDiProps();
+ FULL_INSTANCE = bp;
+ } catch (IOException e) {
+ // creating dummy
+ bp = new UBiDiProps(true);
+ DUMMY_INSTANCE = bp;
+ }
+ INSTANCE = bp;
+ }
}
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/UCaseProps.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/UCaseProps.java
index 029411c5828..ca6b1d740ff 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/impl/UCaseProps.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/UCaseProps.java
@@ -34,10 +34,11 @@ import com.ibm.icu.lang.UCharacter;
import com.ibm.icu.lang.UProperty;
public final class UCaseProps {
+
// constructors etc. --------------------------------------------------- ***
// port of ucase_openProps()
- public UCaseProps() throws IOException {
+ private UCaseProps() throws IOException {
InputStream is=ICUData.getRequiredStream(ICUResourceBundle.ICU_BUNDLE+"/"+DATA_FILE_NAME);
BufferedInputStream b=new BufferedInputStream(is, 4096 /* data buffer size */);
readData(b);
@@ -45,6 +46,12 @@ public final class UCaseProps {
is.close();
}
+ private UCaseProps(boolean makeDummy) { // ignore makeDummy, only creates a unique signature
+ indexes=new int[IX_TOP];
+ indexes[0]=IX_TOP;
+ trie=new CharTrie(0, 0, null); // dummy trie, always returns 0
+ }
+
private final void readData(InputStream is) throws IOException {
DataInputStream inputStream=new DataInputStream(is);
@@ -94,24 +101,18 @@ public final class UCaseProps {
}
}
- // UCaseProps singleton
- private static UCaseProps gCsp=null;
-
// port of ucase_getSingleton()
- public static final synchronized UCaseProps getSingleton() throws IOException {
- if(gCsp==null) {
- gCsp=new UCaseProps();
+ //
+ // Note: Do we really need this API?
+ public static UCaseProps getSingleton() throws IOException {
+ if (FULL_INSTANCE == null) {
+ synchronized (UCaseProps.class) {
+ if (FULL_INSTANCE == null) {
+ FULL_INSTANCE = new UCaseProps();
+ }
+ }
}
- return gCsp;
- }
-
- // UCaseProps dummy singleton
- private static UCaseProps gCspDummy=null;
-
- private UCaseProps(boolean makeDummy) { // ignore makeDummy, only creates a unique signature
- indexes=new int[IX_TOP];
- indexes[0]=IX_TOP;
- trie=new CharTrie(0, 0, null); // dummy trie, always returns 0
+ return FULL_INSTANCE;
}
/**
@@ -120,11 +121,16 @@ public final class UCaseProps {
* Using the dummy can reduce checks for available data after an initial failure.
* Port of ucase_getDummy().
*/
- public static final synchronized UCaseProps getDummy() {
- if(gCspDummy==null) {
- gCspDummy=new UCaseProps(true);
+ // Note: do we really need this API?
+ public static UCaseProps getDummy() {
+ if (DUMMY_INSTANCE == null) {
+ synchronized (UCaseProps.class) {
+ if (DUMMY_INSTANCE == null) {
+ DUMMY_INSTANCE = new UCaseProps(true);
+ }
+ }
}
- return gCspDummy;
+ return DUMMY_INSTANCE;
}
// set of property starts for UnicodeSet ------------------------------- ***
@@ -1459,4 +1465,28 @@ public final class UCaseProps {
private static final int UNFOLD_ROWS=0;
private static final int UNFOLD_ROW_WIDTH=1;
private static final int UNFOLD_STRING_WIDTH=2;
+
+
+ /*
+ * public singleton instance
+ */
+ public static final UCaseProps INSTANCE;
+
+ private static volatile UCaseProps FULL_INSTANCE;
+ private static volatile UCaseProps DUMMY_INSTANCE;
+
+ // This static initializer block must be placed after
+ // other static member initialization
+ static {
+ UCaseProps cp;
+ try {
+ cp = new UCaseProps();
+ FULL_INSTANCE = cp;
+ } catch (IOException e) {
+ // creating dummy
+ cp = new UCaseProps(true);
+ DUMMY_INSTANCE = cp;
+ }
+ INSTANCE = cp;
+ }
}
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/UCharacterName.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/UCharacterName.java
index bf980b9a36b..67762dce91c 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/impl/UCharacterName.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/UCharacterName.java
@@ -36,6 +36,21 @@ public final class UCharacterName
{
// public data members ----------------------------------------------
+ /*
+ * public singleton instance
+ */
+ public static final UCharacterName INSTANCE;
+
+ static {
+ try {
+ INSTANCE = new UCharacterName();
+ } catch (IOException e) {
+ ///CLOVER:OFF
+ throw new MissingResourceException("Could not construct UCharacterName. Missing unames.icu","","");
+ ///CLOVER:ON
+ }
+ }
+
/**
* Number of lines per group
* 1 << GROUP_SHIFT_
@@ -48,26 +63,6 @@ public final class UCharacterName
// public methods ---------------------------------------------------
- /**
- * Gets the only instance of UCharacterName
- * @return only instance of UCharacterName
- * @exception MissingResourceException thrown when reading of name data fails
- */
- public static UCharacterName getInstance()
- {
- if (INSTANCE_ == null) {
- try {
- INSTANCE_ = new UCharacterName();
- }catch(IOException e){
- throw new MissingResourceException("Could not construct UCharacterName. Missing unames.icu","","");
- }
- catch (Exception e) {
- throw new MissingResourceException(e.getMessage(),"","");
- }
- }
- return INSTANCE_;
- }
-
/**
* Retrieve the name of a Unicode code point.
* Depending on choice
, the character name written into the
@@ -1118,10 +1113,6 @@ public final class UCharacterName
* Maximum name length
*/
private int m_maxNameLength_;
- /**
- * Singleton instance
- */
- private static UCharacterName INSTANCE_ = null;
/**
* Type names used for extended names
*/
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/UCharacterProperty.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/UCharacterProperty.java
index 953dba919e8..a97302a78b7 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/impl/UCharacterProperty.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/UCharacterProperty.java
@@ -42,6 +42,20 @@ public final class UCharacterProperty
{
// public data members -----------------------------------------------
+ /*
+ * public singleton instance
+ */
+ public static final UCharacterProperty INSTANCE;
+
+ static {
+ try {
+ INSTANCE = new UCharacterProperty();
+ }
+ catch (IOException e) {
+ throw new MissingResourceException(e.getMessage(),"","");
+ }
+ }
+
/**
* Trie data
*/
@@ -567,23 +581,6 @@ public final class UCharacterProperty
return (lead << LEAD_SURROGATE_SHIFT_) + trail + SURROGATE_OFFSET_;
}
- /**
- * Loads the property data and initialize the UCharacterProperty instance.
- * @throws MissingResourceException when data is missing or data has been corrupted
- */
- public static UCharacterProperty getInstance()
- {
- if(INSTANCE_ == null) {
- try {
- INSTANCE_ = new UCharacterProperty();
- }
- catch (Exception e) {
- throw new MissingResourceException(e.getMessage(),"","");
- }
- }
- return INSTANCE_;
- }
-
/**
*
* Unicode property names and property value names are compared
@@ -734,11 +731,6 @@ public final class UCharacterProperty
int m_maxJTGValue_;
// private variables -------------------------------------------------
- /**
- * UnicodeData.txt property object
- */
- private static UCharacterProperty INSTANCE_ = null;
-
/**
* Default name of the datafile
*/
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/UPropertyAliases.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/UPropertyAliases.java
index 584360b93e5..c02ef939dd6 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/impl/UPropertyAliases.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/UPropertyAliases.java
@@ -118,7 +118,7 @@ public final class UPropertyAliases implements ICUBinary.Authenticate {
* DATA_FILE_NAME is read from the jar/classpath and unflattened
* into member variables of this object.
*/
- public UPropertyAliases() throws IOException {
+ private UPropertyAliases() throws IOException {
// Open the .icu file from the jar/classpath
InputStream is = ICUData.getRequiredStream(DATA_FILE_NAME);
@@ -204,19 +204,16 @@ public final class UPropertyAliases implements ICUBinary.Authenticate {
//----------------------------------------------------------------
// Public API
- public static UPropertyAliases INSTANCE_;
+ public static final UPropertyAliases INSTANCE;
- public static synchronized UPropertyAliases getInstance() {
- if (INSTANCE_ == null) {
- try {
- INSTANCE_ = new UPropertyAliases();
- } catch(IOException e){
- ///CLOVER:OFF
- throw new MissingResourceException("Could not construct UPropertyAliases. Missing pnames.icu","","");
- ///CLOVER:ON
- }
+ static {
+ try {
+ INSTANCE = new UPropertyAliases();
+ } catch(IOException e) {
+ ///CLOVER:OFF
+ throw new MissingResourceException("Could not construct UPropertyAliases. Missing pnames.icu","","");
+ ///CLOVER:ON
}
- return INSTANCE_;
}
/**
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/lang/UCharacter.java b/icu4j/main/classes/core/src/com/ibm/icu/lang/UCharacter.java
index 85429cca6d6..c9aa99deb36 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/lang/UCharacter.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/lang/UCharacter.java
@@ -12,7 +12,6 @@ import java.lang.ref.SoftReference;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
-import java.util.MissingResourceException;
import com.ibm.icu.impl.IllegalIcuArgumentException;
import com.ibm.icu.impl.NormalizerImpl;
@@ -2020,7 +2019,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
return INVALID_CODE;
}
- return UnicodeBlock.getInstance((PROPERTY_.getAdditional(ch, 0)
+ return UnicodeBlock.getInstance((UCharacterProperty.INSTANCE.getAdditional(ch, 0)
& BLOCK_MASK_) >> BLOCK_SHIFT_);
}
@@ -2036,7 +2035,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
return -1;
}
- return (PROPERTY_.getAdditional(ch, 0) & BLOCK_MASK_) >> BLOCK_SHIFT_;
+ return (UCharacterProperty.INSTANCE.getAdditional(ch, 0) & BLOCK_MASK_) >> BLOCK_SHIFT_;
}
/**
@@ -3114,7 +3113,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
public static int getNumericValue(int ch)
{
// slightly pruned version of getUnicodeNumericValue(), plus getEuropeanDigit()
- int props = PROPERTY_.getProperty(ch);
+ int props = UCharacterProperty.INSTANCE.getProperty(ch);
int ntv = getNumericTypeValue(props);
if(ntv==NTV_NONE_) {
@@ -3169,7 +3168,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
public static double getUnicodeNumericValue(int ch)
{
// equivalent to c version double u_getNumericValue(UChar32 c)
- int props = PROPERTY_.getProperty(ch);
+ int props = UCharacterProperty.INSTANCE.getProperty(ch);
int ntv = getNumericTypeValue(props);
if(ntv==NTV_NONE_) {
@@ -3631,7 +3630,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
* @stable ICU 2.1
*/
public static int toLowerCase(int ch) {
- return gCsp.tolower(ch);
+ return UCaseProps.INSTANCE.tolower(ch);
}
/**
@@ -3684,7 +3683,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
* @stable ICU 2.1
*/
public static int toTitleCase(int ch) {
- return gCsp.totitle(ch);
+ return UCaseProps.INSTANCE.totitle(ch);
}
/**
@@ -3707,7 +3706,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
* @stable ICU 2.1
*/
public static int toUpperCase(int ch) {
- return gCsp.toupper(ch);
+ return UCaseProps.INSTANCE.toupper(ch);
}
// extra methods not in java.lang.Character --------------------------
@@ -3795,7 +3794,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
*/
public static int getDirection(int ch)
{
- return gBdp.getClass(ch);
+ return UBiDiProps.INSTANCE.getClass(ch);
}
/**
@@ -3809,7 +3808,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
*/
public static boolean isMirrored(int ch)
{
- return gBdp.isMirrored(ch);
+ return UBiDiProps.INSTANCE.isMirrored(ch);
}
/**
@@ -3828,7 +3827,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
*/
public static int getMirror(int ch)
{
- return gBdp.getMirror(ch);
+ return UBiDiProps.INSTANCE.getMirror(ch);
}
/**
@@ -3911,7 +3910,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
*/
public static VersionInfo getUnicodeVersion()
{
- return PROPERTY_.m_unicodeVersion_;
+ return UCharacterProperty.INSTANCE.m_unicodeVersion_;
}
/**
@@ -3927,13 +3926,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
*/
public static String getName(int ch)
{
- ///CLOVER:OFF
- // NAME_ is always initialized when the class is initialized
- if(NAME_==null){
- throw new MissingResourceException("Could not load unames.icu","","");
- }
- ///CLOVER:ON
- return NAME_.getName(ch, UCharacterNameChoice.UNICODE_CHAR_NAME);
+ return UCharacterName.INSTANCE.getName(ch, UCharacterNameChoice.UNICODE_CHAR_NAME);
}
/**
@@ -3970,13 +3963,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
*/
public static String getName1_0(int ch)
{
- ///CLOVER:OFF
- // NAME_ is always initialized when the class is initialized
- if(NAME_==null){
- throw new MissingResourceException("Could not load unames.icu","","");
- }
- ///CLOVER:ON
- return NAME_.getName(ch,
+ return UCharacterName.INSTANCE.getName(ch,
UCharacterNameChoice.UNICODE_10_CHAR_NAME);
}
@@ -3999,13 +3986,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
* @stable ICU 2.6
*/
public static String getExtendedName(int ch) {
- ///CLOVER:OFF
- // NAME_ is always initialized when the class is initialized
- if(NAME_==null){
- throw new MissingResourceException("Could not load unames.icu","","");
- }
- ///CLOVER:ON
- return NAME_.getName(ch, UCharacterNameChoice.EXTENDED_CHAR_NAME);
+ return UCharacterName.INSTANCE.getName(ch, UCharacterNameChoice.EXTENDED_CHAR_NAME);
}
/**
@@ -4021,13 +4002,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
*/
public static String getNameAlias(int ch)
{
- ///CLOVER:OFF
- // NAME_ is always initialized when the class is initialized
- if(NAME_==null){
- throw new MissingResourceException("Could not load unames.icu", "", "");
- }
- ///CLOVER:ON
- return NAME_.getName(ch, UCharacterNameChoice.CHAR_NAME_ALIAS);
+ return UCharacterName.INSTANCE.getName(ch, UCharacterNameChoice.CHAR_NAME_ALIAS);
}
/**
@@ -4050,13 +4025,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
return null;
}
- ///CLOVER:OFF
- // NAME_ is always initialized when the class is initialized
- if(NAME_==null){
- throw new MissingResourceException("Could not load unames.icu","","");
- }
- ///CLOVER:ON
- String result = NAME_.getGroupName(ch,
+ String result = UCharacterName.INSTANCE.getGroupName(ch,
UCharacterNameChoice.ISO_COMMENT_);
return result;
}
@@ -4072,13 +4041,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
* @stable ICU 2.1
*/
public static int getCharFromName(String name){
- ///CLOVER:OFF
- // NAME_ is always initialized when the class is initialized
- if(NAME_==null){
- throw new MissingResourceException("Could not load unames.icu","","");
- }
- ///CLOVER:ON
- return NAME_.getCharFromName(
+ return UCharacterName.INSTANCE.getCharFromName(
UCharacterNameChoice.UNICODE_CHAR_NAME, name);
}
@@ -4093,13 +4056,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
* @stable ICU 2.1
*/
public static int getCharFromName1_0(String name){
- ///CLOVER:OFF
- // NAME_ is always initialized when the class is initialized
- if(NAME_==null){
- throw new MissingResourceException("Could not load unames.icu","","");
- }
- ///CLOVER:ON
- return NAME_.getCharFromName(
+ return UCharacterName.INSTANCE.getCharFromName(
UCharacterNameChoice.UNICODE_10_CHAR_NAME, name);
}
@@ -4123,13 +4080,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
* @stable ICU 2.6
*/
public static int getCharFromExtendedName(String name){
- ///CLOVER:OFF
- // NAME_ is always initialized when the class is initialized
- if(NAME_==null){
- throw new MissingResourceException("Could not load unames.icu","","");
- }
- ///CLOVER:ON
- return NAME_.getCharFromName(
+ return UCharacterName.INSTANCE.getCharFromName(
UCharacterNameChoice.EXTENDED_CHAR_NAME, name);
}
@@ -4143,13 +4094,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
* @draft ICU 4.4
*/
public static int getCharFromNameAlias(String name){
- ///CLOVER:OFF
- // NAME_ is always initialized when the class is initialized
- if(NAME_==null){
- throw new MissingResourceException("Could not load unames.icu", "", "");
- }
- ///CLOVER:ON
- return NAME_.getCharFromName(UCharacterNameChoice.CHAR_NAME_ALIAS, name);
+ return UCharacterName.INSTANCE.getCharFromName(UCharacterNameChoice.CHAR_NAME_ALIAS, name);
}
/**
@@ -4187,7 +4132,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
*/
public static String getPropertyName(int property,
int nameChoice) {
- return PNAMES_.getPropertyName(property, nameChoice);
+ return UPropertyAliases.INSTANCE.getPropertyName(property, nameChoice);
}
/**
@@ -4213,7 +4158,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
* @stable ICU 2.4
*/
public static int getPropertyEnum(String propertyAlias) {
- int propEnum = PNAMES_.getPropertyEnum(propertyAlias);
+ int propEnum = UPropertyAliases.INSTANCE.getPropertyEnum(propertyAlias);
if (propEnum == UProperty.UNDEFINED) {
throw new IllegalIcuArgumentException("Invalid name: " + propertyAlias);
}
@@ -4283,14 +4228,14 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
// this is hard coded for the valid cc
// because PropertyValueAliases.txt does not contain all of them
try {
- return PNAMES_.getPropertyValueName(property, value,
+ return UPropertyAliases.INSTANCE.getPropertyValueName(property, value,
nameChoice);
}
catch (IllegalArgumentException e) {
return null;
}
}
- return PNAMES_.getPropertyValueName(property, value, nameChoice);
+ return UPropertyAliases.INSTANCE.getPropertyValueName(property, value, nameChoice);
}
/**
@@ -4325,7 +4270,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
* @stable ICU 2.4
*/
public static int getPropertyValueEnum(int property, String valueAlias) {
- int propEnum = PNAMES_.getPropertyValueEnum(property, valueAlias);
+ int propEnum = UPropertyAliases.INSTANCE.getPropertyValueEnum(property, valueAlias);
if (propEnum == UProperty.UNDEFINED) {
throw new IllegalIcuArgumentException("Invalid name: " + valueAlias);
}
@@ -4576,7 +4521,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
locCache[0]=0;
while((c=iter.nextCaseMapCP())>=0) {
- c=gCsp.toFullUpper(c, iter, result, locale, locCache);
+ c = UCaseProps.INSTANCE.toFullUpper(c, iter, result, locale, locCache);
/* decode the result */
if(c<0) {
@@ -4629,7 +4574,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
locCache[0]=0;
while((c=iter.nextCaseMapCP())>=0) {
- c=gCsp.toFullLower(c, iter, result, locale, locCache);
+ c = UCaseProps.INSTANCE.toFullLower(c, iter, result, locale, locCache);
/* decode the result */
if(c<0) {
@@ -4777,8 +4722,8 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
/* find and copy uncased characters [prev..titleStart[ */
iter.setLimit(index);
c=iter.nextCaseMapCP();
- if((options&TITLECASE_NO_BREAK_ADJUSTMENT)==0 && UCaseProps.NONE==gCsp.getType(c)) {
- while((c=iter.nextCaseMapCP())>=0 && UCaseProps.NONE==gCsp.getType(c)) {}
+ if((options&TITLECASE_NO_BREAK_ADJUSTMENT)==0 && UCaseProps.NONE==UCaseProps.INSTANCE.getType(c)) {
+ while((c=iter.nextCaseMapCP())>=0 && UCaseProps.NONE==UCaseProps.INSTANCE.getType(c)) {}
titleStart=iter.getCPStart();
if(prev